File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,19 @@ def sync_to_resource(self, symlink=None):
67
67
self .local_path ,
68
68
f"{ self .rpath } { os .path .basename (self .local_path )} "
69
69
)
70
-
71
- if symlink is not None :
72
- self .logger .info ("Linking" )
73
- try :
74
- conn .run_check (f"test ! -e { symlink } -o -L { symlink } " )
75
- except ExecutionError :
76
- raise ManagedFileError (f"Path { symlink } exists but is not a symlink." )
77
- # use short options to be compatible with busybox
78
- # --symbolic --force --no-dereference
79
- conn .run_check (f"ln -sfn { self .rpath } { os .path .basename (self .local_path )} { symlink } " )
80
-
70
+ else :
71
+ conn = sshmanager .open ("localhost" )
72
+ self .rpath = os .path .dirname (self .local_path ) + "/"
73
+
74
+ if symlink is not None :
75
+ self .logger .info ("Linking" )
76
+ try :
77
+ conn .run_check (f"test ! -e { symlink } -o -L { symlink } " )
78
+ except ExecutionError :
79
+ raise ManagedFileError (f"Path { symlink } exists but is not a symlink." )
80
+ # use short options to be compatible with busybox
81
+ # --symbolic --force --no-dereference
82
+ conn .run_check (f"ln -sfn { self .rpath } { os .path .basename (self .local_path )} { symlink } " )
81
83
82
84
def _on_nfs (self , conn ):
83
85
if self ._on_nfs_cached is not None :
You can’t perform that action at this time.
0 commit comments