DELETE-FILE uses wrong current working directory
Bug #882877 reported by
Ilya Perminov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
If DELETE-FILE is called with a relative file name, it passes it to Unix unlink without expanding it to an absolute path.
Test case:
(with-open-file (s #p"/tmp/test-file" :direction :output :if-exists :supersede)
(print 0 s))
(sb-posix:chdir "/")
(setf *default-
(probe-file #p"test-file") ; => #P"/tmp/test-file"
(delete-file #p"test-file") ; => Error: couldn't delete test-file: No such file or directory
Changed in sbcl: | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in sbcl: | |
assignee: | nobody → Nikodemus Siivola (nikodemus) |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Seems easy to fix. Here's how it was fixed in my lfn-upstream branch: /github. com/akovalenko/ sbcl-win32- threads/ commit/ 7991c2c2c33face d2a6bb1d00c8dc1 b8a5db11ba
https:/