Fix copy-file

release
Slava Pestov 2007-11-24 18:05:34 -05:00
parent 10db300895
commit 43931a4a43
2 changed files with 5 additions and 2 deletions

View File

@ -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 [

View File

@ -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