Fix copy-file
parent
10db300895
commit
43931a4a43
|
@ -53,8 +53,11 @@ TUPLE: CreateProcess-args
|
|||
CreateProcess-args-lpProcessInformation
|
||||
} get-slots CreateProcess win32-error=0/f ;
|
||||
|
||||
: escape-argument ( str -- newstr )
|
||||
[ [ dup CHAR: " = [ CHAR: \\ , ] when , ] each ] "" make ;
|
||||
|
||||
: join-arguments ( args -- cmd-line )
|
||||
[ "\"" swap "\"" 3append ] map " " join ;
|
||||
[ "\"" swap escape-argument "\"" 3append ] map " " join ;
|
||||
|
||||
: app-name/cmd-line ( -- app-name cmd-line )
|
||||
+command+ get [
|
||||
|
|
|
@ -116,7 +116,7 @@ M: windows-io delete-file ( path -- )
|
|||
|
||||
M: windows-io copy-file ( from to -- )
|
||||
dup parent-directory make-directories
|
||||
[ normalize-pathname ] 2apply f CopyFile win32-error=0/f ;
|
||||
[ normalize-pathname ] 2apply 0 CopyFile win32-error=0/f ;
|
||||
|
||||
M: windows-io make-directory ( path -- )
|
||||
normalize-pathname
|
||||
|
|
Loading…
Reference in New Issue