]> gitweb.factorcode.org Git - factor.git/commitdiff
io.files.trash.unix: use xdg vocab.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Feb 2018 01:16:43 +0000 (17:16 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Feb 2018 01:16:43 +0000 (17:16 -0800)
extra/io/files/trash/unix/unix.factor

index 99d82078a7443892d0ab9b8bf39de5d8447cd9f4..d24dec443b9b0b026b4fa8e4218f52309ecab1db 100644 (file)
@@ -5,7 +5,7 @@ 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 ;
+unix.users xdg ;
 
 IN: io.files.trash.unix
 
@@ -31,9 +31,7 @@ IN: io.files.trash.unix
     } 1&& [ "invalid trash path" throw ] unless ;
 
 : trash-home ( -- path )
-    "XDG_DATA_HOME" os-env
-    home ".local/share" append-path or
-    "Trash" append-path dup check-trash-path ;
+    xdg-data-home "Trash" append-path dup check-trash-path ;
 
 : trash-1 ( root -- path )
     ".Trash" append-path dup check-trash-path