Commit [9df2ab] Maximize Restore History

1.0.44.21: expand ~ in pathnames

~/... => (:ABSOLUTE :HOME ...)

~user/... => (:ABSOLUTE (:HOME "user") ...)

Translation back to NAMESTRING reinstates the tilde, so we retain
read/write consistency.

NATIVE-NAMESTRING is responsible for getting the actual full path
to specified home directory.

This late resolution is necessary to have (open "~/foo") and
(open #p"~/foo") open the same file in compiled code -- regardless
of who compiled the file.

Tilde is treated specially only at the start of the first directory
component: it doesn't need to be escaped anywhere else. After trying
out the various options (escape everywhere, escape in directory
components, escape at the start of directory components, escape at
the start of all components) this seemed both least intrusive and
least ambiguous when documented -- not to mention most backwards
compatible.

Currently escaping the tilde does not work on Windows, but this is due to
current general inability to escape the first directory component on
Windows, since \\ is used also as a directory separator for non-native
pathnames as well. See lp#673625. Test-case added for this.

(:HOME "user") also doesn't work on Windows, which is documented
in the manual.

Nikodemus Siivola Nikodemus Siivola 2010-11-10

changed doc/manual/pathnames.texinfo
changed src/code/filesys.lisp
changed src/code/pathname.lisp
changed src/code/target-pathname.lisp
changed src/code/unix-pathname.lisp
changed src/code/unix.lisp
changed src/code/win32-pathname.lisp
changed src/code/win32.lisp
changed src/runtime/wrap.c
changed tests/pathnames.impure.lisp
changed package-data-list.lisp-expr
changed version.lisp-expr
doc/manual/pathnames.texinfo Diff Switch to side-by-side view
Loading...
src/code/filesys.lisp Diff Switch to side-by-side view
Loading...
src/code/pathname.lisp Diff Switch to side-by-side view
Loading...
src/code/target-pathname.lisp Diff Switch to side-by-side view
Loading...
src/code/unix-pathname.lisp Diff Switch to side-by-side view
Loading...
src/code/unix.lisp Diff Switch to side-by-side view
Loading...
src/code/win32-pathname.lisp Diff Switch to side-by-side view
Loading...
src/code/win32.lisp Diff Switch to side-by-side view
Loading...
src/runtime/wrap.c Diff Switch to side-by-side view
Loading...
tests/pathnames.impure.lisp Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...
version.lisp-expr Diff Switch to side-by-side view
Loading...