diff --git a/core/io/files/files.factor b/core/io/files/files.factor
index 498d23b3ca..967f2f7913 100755
--- a/core/io/files/files.factor
+++ b/core/io/files/files.factor
@@ -70,7 +70,7 @@ TUPLE: no-parent-directory path ;
         { [ dup root-directory? ] [ ] }
         { [ dup [ path-separator? ] contains? not ] [ drop "." ] }
         { [ t ] [
-            last-path-separator drop 1+ cut
+            dup last-path-separator drop 1+ cut
             special-directory? [ no-parent-directory ] when
         ] }
     } cond ;