Skip to content

Commit f043fd5

Browse files
committed
add default dropbox path, #5
1 parent 626625c commit f043fd5

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

Project/Sources/Classes/FileTransfer_Dropbox.4dm

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@ property _timeout : Integer
44

55
Class constructor()
66
This:C1470.onData:=New object:C1471("text"; "")
7+
This:C1470._return:=Char:C90(10)
8+
var $path : Text
79
If (Is macOS:C1572)
8-
This:C1470._return:=Char:C90(10)
9-
This:C1470._Path:="dbxcli"
10+
$path:=Get 4D folder:C485(Current resources folder:K5:16)+"dropbox"+Folder separator:K24:12+"dbxcli"
11+
If (Test path name:C476($path)=Is a document:K24:1)
12+
This:C1470._Path:=Convert path system to POSIX:C1106($path)
13+
Else
14+
This:C1470._Path:="dbxcli"
15+
End if
1016
Else
11-
This:C1470._return:=Char:C90(10) //Char(13)+Char(10)
12-
This:C1470._Path:="dbxcli.exe"
17+
$path:=Get 4D folder:C485(Current resources folder:K5:16)+"dropbox"+Folder separator:K24:12+"dbxcli.exe"
18+
If (Test path name:C476($path)=Is a document:K24:1)
19+
This:C1470._Path:=Convert path system to POSIX:C1106($path)
20+
Else
21+
This:C1470._Path:="dbxcli.exe"
22+
End if
1323
End if
1424
This:C1470._timeout:=0
1525

Project/Sources/Methods/test_dropbox.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var $result; $status; $checkstop : Object
55

66
$ftp:=cs:C1710.FileTransfer_Dropbox.new()
77

8-
$ftp.setPath(" /Users/thomas/Desktop/dbxcli")
8+
//$ftp.setPath(" /Users/thomas/Desktop/dbxcli")
99
// $path:=Get 4D folder(Current resources folder)+"Dropbox"+Folder separator+"dbxcli.exe"
1010

1111
If (False:C215)

Project/Sources/catalog.4DCatalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE base SYSTEM "http://www.4d.com/dtd/2007/base.dtd" >
33
<base name="FileTransfer_Curl" uuid="1275CFA301E24C3FAF5C0CCA0B40F474" collation_locale="de">
44
<schema name="DEFAULT_SCHEMA"/>
5-
<base_extra __stringCompHash="icu:72.1.0" __keywordBuildingHash="icu:72.1.0">
5+
<base_extra>
66
<journal_file journal_file_enabled="false"/>
77
</base_extra>
88
</base>

0 commit comments

Comments
 (0)