@@ -89,7 +89,7 @@ define function %resolve-locator
89
89
end
90
90
elseif (path-length > $MAX_PATH)
91
91
win32-file-system-error("resolve" , "%s" , locator)
92
- elseif (~%file-exists?(locator))
92
+ elseif (~%file-exists?(locator, #t ))
93
93
win32-file-system-error("resolve" , "%s" , locator)
94
94
else
95
95
as (object-class (locator), copy-sequence (path-buffer, end: path-length))
@@ -99,7 +99,8 @@ end function;
99
99
100
100
// /
101
101
define function %file-exists?
102
- (file :: <microsoft-file-system-locator>) => (exists? :: <boolean> )
102
+ (file :: <microsoft-file-system-locator>, follow-links? :: <boolean> )
103
+ => (exists? :: <boolean> )
103
104
let file = %expand-pathname(file);
104
105
if (primitive-machine-word-not-equal?
105
106
(%call-c-function ("GetFileAttributesA" , c-modifiers: "__stdcall" )
@@ -179,7 +180,7 @@ define function %copy-file
179
180
let destination = %expand-pathname(destination);
180
181
// NOTE: Contrary to the documentation, CopyFile won't copy over
181
182
// an existing read-only file so we need to delete it manually.
182
- if (if-exists == # "replace" & %file-exists?(destination))
183
+ if (if-exists == # "replace" & %file-exists?(destination, #f ))
183
184
%delete-file(destination)
184
185
end ;
185
186
unless (primitive-raw-as-boolean
@@ -211,7 +212,7 @@ define function %rename-file
211
212
// the move if the target exists because MoveFileEx isn't implemented
212
213
// in Windows 95. (When this code was originally written, the
213
214
// documentation for MoveFileEx failed to mention that fact. Sigh)
214
- if (if-exists == # "replace" & %file-exists?(destination))
215
+ if (if-exists == # "replace" & %file-exists?(destination, #f ))
215
216
%delete-file(destination)
216
217
end ;
217
218
unless (primitive-raw-as-boolean
@@ -494,7 +495,7 @@ end function %delete-directory;
494
495
// /---*** Is there an easier way? (Look into it ...)
495
496
define function %directory-empty?
496
497
(directory :: <microsoft-directory-locator>) => (empty? :: <boolean> )
497
- ~%file-exists?(directory)
498
+ ~%file-exists?(directory, #f )
498
499
| block (return)
499
500
%do-directory
500
501
(method (directory :: <microsoft-directory-locator>, name :: <string> , type :: <file-type>)
0 commit comments