@@ -76,7 +76,7 @@ Function setPath($path : Text)
7676Function enableProgressData ($enable : Boolean)
7777 This:C1470 ._noProgress := Not:C34 ($enable )
7878
79- Function enableStopButton ($enable : Object )
79+ Function enableStopButton ($enable : Boolean )
8080 This:C1470 ._enableStopButton := $enable
8181
8282Function useCallback ($callback : 4D:C1709 .Function ; $ID : Text)
@@ -95,6 +95,7 @@ Function upload($sourcepath : Text; $targetpath : Text; $append : Boolean)->$suc
9595 // If the remote file does not exist, it will be created.
9696 // Note that this flag is ignored by some SFTP servers (including OpenSSH).
9797 ASSERT:C1129 ($sourcepath # "" ; "source path must not be empty" )
98+ $doublequotes := Char:C90 (Double quote:K15:41 )
9899 If ($targetpath= "")
99100 $targetpath := "/"
100101 End if
@@ -105,7 +106,7 @@ Function upload($sourcepath : Text; $targetpath : Text; $append : Boolean)->$suc
105106 If ((This:C1470 ._AutoCreateRemoteDir # Null:C1517) && (This:C1470 ._AutoCreateRemoteDir ))
106107 $url := "--ftp-create-dirs " + $url
107108 End if
108- $url := "-T " + $sourcepath + " " + $url + $targetpath
109+ $url := "-T " + $doublequotes + $ sourcepath+ $doublequotes + " " + $url + $targetpath
109110 $oldtimeout := This:C1470 ._timeout
110111 If ($oldtimeout= 0)
111112 This:C1470 ._timeout := 600
@@ -193,7 +194,7 @@ Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object
193194 ASSERT:C1129 ($targetpath # "" ; "target path must not be empty" )
194195 $url := This:C1470 ._buildURL ()
195196 If (This:C1470 ._protocol # "SFTP")
196- $url := $url + " -Q " + Char:C90 (34 )+ "-cu " + $sourcepath + Char:C90 (34 )+ " -Q " + Char:C90 (34 )+ "-RNTO " + $targetpath + Char:C90 (34 )
197+ $url := $url + " -Q " + Char:C90 (34 )+ "-RNFR " + $sourcepath + Char:C90 (34 )+ " -Q " + Char:C90 (34 )+ "-RNTO " + $targetpath + Char:C90 (34 )
197198 Else
198199 $url := $url + " -Q " + Char:C90 (34 )+ "-RENAME " + $sourcepath + Char:C90 (34 )+ " " + $targetpath + Char:C90 (34 )
199200 End if
0 commit comments