Comments (5)
(list :software (list (software-type) (software-version))
:implementation (list (lisp-implementation-type) (lisp-implementation-version))
:machine (machine-type)) =>
(:SOFTWARE ("Darwin" "18.7.0")
:IMPLEMENTATION ("Clozure Common Lisp" "Version 1.12.1 (v1.12.1) DarwinX8664")
:MACHINE "x86_64")
from cl-fad.
I don't think ~ is defined, it's an implementation specific thing.
from cl-fad.
No input, defined or not, legal or not, should produce illegal output such as a ""
directory component.
CL-FAD exists because everything to do with pathnames is implementation specific.
By widespread convention ~
is the user's home directory - follow the rule of least surprise.
#+CCL (setq pathspec (pathname pathspec))
seems to fix it in CCL,
now it runs (fad:walk-directory "~" …) ok but that's no stress test.
CCL does
(pathname-name "~") => "~"
(pathname-name #P"~") => NIL
(pathname-name (pathname "~")) => NIL
therefore
(fad:directory-pathname-p "~") => NIL
(fad:directory-pathname-p #P"~") => #P"/Users/devon/"
(fad:directory-pathname-p (pathname "~")) => #P"/Users/devon/"
which smells buggy to me, I'll grovel their sources and maybe talk to them too.
from cl-fad.
fad is a portability layer, ~ is not portable, so how it works is moot.
from cl-fad.
The current behavior is compatible with filesystems that allow zero length names.
All others would prefer to signal an error rather than poison the caller with time bombs, e.g.,
(ccl:advise fad:pathname-as-directory
(let ((dir (:do-it)))
(assert (not (find "" (pathname-directory dir)
:test #'equal)))
dir)
:when :around
:name fad--pathname-as-directory-safety)
Oh, and a Merry Solstice to all, and to all a good night!
from cl-fad.
Related Issues (20)
- :description
- please keep cl-test-grid informed about testsuite changes
- WITH-OPEN-TEMPORARY-FILE not working on Windows HOT 2
- Asymmetry between directory-exists-p and directory-pathname-p HOT 1
- list-directory replaces [ characters in filenames with \\[, resulting in an extra slash... HOT 2
- Again: list-directory replaces [ characters in filenames with \\[, resulting in an extra backslash... HOT 8
- error in `list-directory` when encountering a broken symlink HOT 1
- merge temporary-files HOT 5
- Suggestion to prevent infinite loops when traversing HOT 1
- get-default-temporary-directory returns a truename containing :unspecified on LispWorks
- Copy directory recursively HOT 6
- WITH-TEMPORARY-DIRECTORY ?
- add truenameize from asdf HOT 1
- The test compares truename with non-truenames HOT 2
- Generate random temporary folder HOT 2
- Build error for lispworks HOT 2
- CMUCL regression in cl-fad 0.7.0 HOT 1
- Minor issue with the homepage download link
- CentOS 6 compatibility HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cl-fad.