io.files.trash: use normalize-path.
parent
4cb4308a11
commit
8d4f0be202
|
@ -2,7 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: alien.c-types alien.strings alien.syntax classes.struct
|
USING: alien.c-types alien.strings alien.syntax classes.struct
|
||||||
core-foundation io.encodings.utf8 io.files.trash kernel system ;
|
core-foundation io.backend io.encodings.utf8 io.files.trash
|
||||||
|
kernel system ;
|
||||||
|
|
||||||
IN: io.files.trash.macosx
|
IN: io.files.trash.macosx
|
||||||
|
|
||||||
|
@ -59,5 +60,6 @@ FUNCTION: OSStatus FSPathMakeRefWithOptions (
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: macosx send-to-trash ( path -- )
|
M: macosx send-to-trash ( path -- )
|
||||||
|
normalize-path
|
||||||
<fs-ref> f kFSFileOperationDefaultOptions
|
<fs-ref> f kFSFileOperationDefaultOptions
|
||||||
FSMoveObjectToTrashSync check-err ;
|
FSMoveObjectToTrashSync check-err ;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: accessors calendar combinators.short-circuit environment
|
USING: accessors calendar combinators.short-circuit environment
|
||||||
formatting io io.directories io.encodings.utf8 io.files
|
formatting io io.backend io.directories io.encodings.utf8
|
||||||
io.files.info io.files.info.unix io.files.trash io.files.types
|
io.files io.files.info io.files.info.unix io.files.trash
|
||||||
io.pathnames kernel math math.parser sequences system unix.stat
|
io.files.types io.pathnames kernel math math.parser sequences
|
||||||
unix.users xdg ;
|
system unix.stat unix.users xdg ;
|
||||||
|
|
||||||
IN: io.files.trash.unix
|
IN: io.files.trash.unix
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ IN: io.files.trash.unix
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: unix send-to-trash ( path -- )
|
M: unix send-to-trash ( path -- )
|
||||||
dup trash-path [
|
normalize-path dup trash-path [
|
||||||
"files" append-path [ make-user-directory ] keep
|
"files" append-path [ make-user-directory ] keep
|
||||||
to-directory safe-file-name
|
to-directory safe-file-name
|
||||||
] [
|
] [
|
||||||
|
|
Loading…
Reference in New Issue