@@ -76,7 +76,7 @@ Function setPath($path : Text)
76
76
Function enableProgressData ($enable : Boolean)
77
77
This:C1470 ._noProgress := Not:C34 ($enable )
78
78
79
- Function enableStopButton ($enable : Object )
79
+ Function enableStopButton ($enable : Boolean )
80
80
This:C1470 ._enableStopButton := $enable
81
81
82
82
Function useCallback ($callback : 4D:C1709 .Function ; $ID : Text)
@@ -95,6 +95,7 @@ Function upload($sourcepath : Text; $targetpath : Text; $append : Boolean)->$suc
95
95
// If the remote file does not exist, it will be created.
96
96
// Note that this flag is ignored by some SFTP servers (including OpenSSH).
97
97
ASSERT:C1129 ($sourcepath # "" ; "source path must not be empty" )
98
+ $doublequotes := Char:C90 (Double quote:K15:41 )
98
99
If ($targetpath= "")
99
100
$targetpath := "/"
100
101
End if
@@ -105,7 +106,7 @@ Function upload($sourcepath : Text; $targetpath : Text; $append : Boolean)->$suc
105
106
If ((This:C1470 ._AutoCreateRemoteDir # Null:C1517) && (This:C1470 ._AutoCreateRemoteDir ))
106
107
$url := "--ftp-create-dirs " + $url
107
108
End if
108
- $url := "-T " + $sourcepath + " " + $url + $targetpath
109
+ $url := "-T " + $doublequotes + $ sourcepath+ $doublequotes + " " + $url + $targetpath
109
110
$oldtimeout := This:C1470 ._timeout
110
111
If ($oldtimeout= 0)
111
112
This:C1470 ._timeout := 600
@@ -193,7 +194,7 @@ Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object
193
194
ASSERT:C1129 ($targetpath # "" ; "target path must not be empty" )
194
195
$url := This:C1470 ._buildURL ()
195
196
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 )
197
198
Else
198
199
$url := $url + " -Q " + Char:C90 (34 )+ "-RENAME " + $sourcepath + Char:C90 (34 )+ " " + $targetpath + Char:C90 (34 )
199
200
End if
0 commit comments