diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/nlib.lisp | 14 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 11 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/interp/nlib.lisp b/src/interp/nlib.lisp index 770c6ada..8a9a2e99 100644 --- a/src/interp/nlib.lisp +++ b/src/interp/nlib.lisp @@ -241,24 +241,12 @@ (putindextable ctable filearg)) -(defun get-directory-list (ft) - (let ((cd (|getWorkingDirectory|))) - (cond ((member ft '("NRLIB" "DAASE" "EXPOSED") :test #'string=) - (if (eq |$UserLevel| '|development|) - (cons cd $library-directory-list) - $library-directory-list)) - (t (adjoin cd - (adjoin (namestring (|userHomeDirectory|)) - $directory-list - :test #'string=) - :test #'string=))))) - (defun make-input-filename (filearg &optional (filetype nil)) (let* ((filename (|makeFilename| filearg filetype)) (dirname (pathname-directory filename)) (ft (pathname-type filename)) - (dirs (get-directory-list ft)) + (dirs (|getDirectoryList| ft)) (newfn nil)) (if (or (null dirname) (eqcar dirname :relative)) (dolist (dir dirs (|probeReadableFile| filename)) diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 164b435e..a29779e9 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -449,3 +449,14 @@ makeFilename(filearg,filetype==nil) == makeFullFilePath(filearg,filetype==nil) == filePathString mergeFilePaths makeFilename(filearg,filetype) +getDirectoryList ft == + here := getWorkingDirectory() + ft in '("NRLIB" "DAASE" "EXPOSED") => + $UserLevel = 'development => [here,:$LIBRARY_-DIRECTORY_-LIST] + $LIBRARY_-DIRECTORY_-LIST + home := filePathString userHomeDirectory() + dirs := + stringMember?(home,$DIRECTORY_-LIST) => $DIRECTORY_-LIST + [home,:$DIRECTORY_-LIST] + stringMember?(here,dirs) => dirs + [here,:dirs] |