Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hugo Ishimaru
asdf
Commits
347a1733
Commit
347a1733
authored
Jun 23, 2016
by
Robert Goldman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for clisp wild pathnames, ticket 1592180.
parent
87c42eef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
uiop/filesystem.lisp
uiop/filesystem.lisp
+16
-7
No files found.
uiop/filesystem.lisp
View file @
347a1733
...
...
@@ -178,7 +178,7 @@ Also remove duplicates as may appear with some translation rules.
This function is used as a helper to DIRECTORY-FILES to avoid invalid entries
when using logical-pathnames."
(
if
(
logical-pathname-p
directory
)
(
remove-duplicates
;; on CLISP, querying ~/ will return duplicates
(
remove-duplicates
;; on CLISP, querying ~/ will return duplicates
;; Try hard to not resolve logical-pathname into physical pathnames;
;; otherwise logical-pathname users/lovers will be disappointed.
;; If directory* could use some implementation-dependent magic,
...
...
@@ -192,9 +192,9 @@ when using logical-pathnames."
;; At this point f should already be a truename,
;; but isn't quite in CLISP, for it doesn't have :version :newest
(
and
u
(
equal
(
truename*
u
)
(
truename*
f
))
u
)))
:when
p
:collect
p
)
:test
'pathname-equal
)
entries
))
:when
p
:collect
p
)
:test
'pathname-equal
)
entries
))
(
defun
directory-files
(
directory
&optional
(
pattern
*wild-file*
))
"Return a list of the files in a directory according to the PATTERN.
...
...
@@ -213,9 +213,18 @@ but the behavior in presence of symlinks is not portable. Use IOlib to handle su
(
unless
(
member
(
pathname-directory
pattern
)
'
(()
(
:relative
))
:test
'equal
)
(
error
"Invalid file pattern ~S for logical directory ~S"
pattern
directory
))
(
setf
pattern
(
make-pathname-logical
pattern
(
pathname-host
dir
))))
(
let*
((
pat
(
merge-pathnames*
pattern
dir
))
(
entries
(
append
(
ignore-errors
(
directory*
pat
))
#+
(
or
clisp
gcl
)
(
let*
((
pat
(
merge-pathnames*
pattern
dir
))
the
following
complex
block
is
;; needed because clisp handles "*" pathnames differently from
;; "*.*" -- the former is more more general than the latter.
;; GCL does something odd, too, but I don't know what this is.
;; Looks like it treats "*" and "*.*" as disjoint.
;; [2016/06/23:rpg]
(
entries
(
append
#-
clisp
(
ignore-errors
(
directory*
pat
))
#+
clisp
(
if
(
equal
:wild
(
pathname-type
pattern
))
(
ignore-errors
(
directory*
(
make-pathname
:type
nil
:defaults
pat
)))
(
ignore-errors
(
directory*
pat
)))
#+
gcl
(
when
(
equal
:wild
(
pathname-type
pattern
))
(
ignore-errors
(
directory*
(
make-pathname
:type
nil
:defaults
pat
)))))))
(
remove-if
'directory-pathname-p
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment