Skip to content

Commit be91140

Browse files
authored
Merge pull request #3 from kneussmichael/main
Various little fixes
2 parents 5e74b89 + 8d81830 commit be91140

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Project/Sources/Classes/FileTransfer_curl.4dm

+4-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Function setPath($path : Text)
7676
Function 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

8282
Function 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

Project/Sources/Classes/SystemWorkerProperties.4dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class constructor($type : Text; $data : Object; $callback : 4D:C1709.Function; $callbackID : Text; $stopButton : Object)
1+
Class constructor($type : Text; $data : Object; $callback : 4D:C1709.Function; $callbackID : Text; $stopButton : Boolean)
22
This:C1470.type:=$type
33
This:C1470.encoding:="UTF-8"
44
This:C1470.dataType:="text"

0 commit comments

Comments
 (0)