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