(zilch vfs): don't symlink to symlinks
This has pretty bad side effects, in case of relative symlinks. Change-Id: Ia7fe5607941dfb07cfb8f739e0dab9666a6a6964
This commit is contained in:
parent
553df0b2fe
commit
de9d250b55
1 changed files with 7 additions and 3 deletions
|
|
@ -81,9 +81,13 @@
|
|||
(lambda (k contents)
|
||||
(define dir (car k))
|
||||
(define fname (cdr k))
|
||||
(if (eq? contents 'directory)
|
||||
(set! dirmap (mapping-update!/default dirmap dir (lambda (v) (cons (cons fname 'directory) v)) '()))
|
||||
(set! dirmap (mapping-update!/default dirmap dir (lambda (v) (cons (cons fname (zsymlink contents)) v)) '()))))
|
||||
(cond
|
||||
((eq? contents 'directory)
|
||||
(set! dirmap (mapping-update!/default dirmap dir (lambda (v) (cons (cons fname 'directory) v)) '())))
|
||||
((z-symlink? contents)
|
||||
(set! dirmap (mapping-update!/default dirmap dir (lambda (v) (cons (cons fname contents) v)) '())))
|
||||
(else
|
||||
(set! dirmap (mapping-update!/default dirmap dir (lambda (v) (cons (cons fname (zsymlink contents)) v)) '())))))
|
||||
(vfs-contents vfs))
|
||||
(define (read-dir dirname)
|
||||
(define contents (mapping-ref/default dirmap dirname '()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue