/[cmucl]/src/code/filesys.lisp
ViewVC logotype

Diff of /src/code/filesys.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.101 by rtoy, Tue Jan 16 17:28:22 2007 UTC revision 1.102 by fgilham, Sat Jan 20 02:01:48 2007 UTC
# Line 1353  optionally keeping some of the most rece Line 1353  optionally keeping some of the most rece
1353    
1354  ;;; Default-Directory  --  Public  ;;; Default-Directory  --  Public
1355  ;;;  ;;;
1356    #||
1357    (defun default-directory ()
1358      "Returns the pathname for the default directory.  This is the place where
1359      a file will be written if no directory is specified.  This may be changed
1360      with setf."
1361      (multiple-value-bind (gr dir-or-error)
1362                           (unix:unix-current-directory)
1363        (if gr
1364            (let ((*ignore-wildcards* t))
1365              (values
1366               (parse-namestring (concatenate 'simple-string dir-or-error "/")
1367                                 *unix-host*)))
1368            (error dir-or-error))))
1369    ||#
1370    ;;;
1371    ;;; XXXX This code was modified by me (fmg) to avoid calling
1372    ;;; concatenate.  The reason for this is that there have been
1373    ;;; intermittent instabilities (segv on startup) when the function
1374    ;;; environment-init (in save.lisp) is called.  Apparently the type
1375    ;;; system is not completely sorted out at the time this function is
1376    ;;; first called.  As a result, strange, not completely reproducable
1377    ;;; things happen, related to something in the state of the
1378    ;;; environment (e.g. the paths or the user environment variables or
1379    ;;; something).  These errors occur in the course of calling
1380    ;;; default-directory and the backtrace indicates they occur in the
1381    ;;; context of the type system.  Since I haven't been able to figure
1382    ;;; out why they happen, I decided to punt.
1383    ;;;
1384    ;;; Hopefully someone will really fix the problem someday.
1385    ;;;
1386    
1387  (defun default-directory ()  (defun default-directory ()
1388    "Returns the pathname for the default directory.  This is the place where    "Returns the pathname for the default directory.  This is the place where
1389    a file will be written if no directory is specified.  This may be changed    a file will be written if no directory is specified.  This may be changed
# Line 1360  optionally keeping some of the most rece Line 1391  optionally keeping some of the most rece
1391    (multiple-value-bind (gr dir-or-error)    (multiple-value-bind (gr dir-or-error)
1392                         (unix:unix-current-directory)                         (unix:unix-current-directory)
1393      (if gr      (if gr
1394          (let ((*ignore-wildcards* t))          (let ((*ignore-wildcards* t)
1395                  (string (make-string (1+ (length dir-or-error)) :initial-element #\/)))
1396            (values            (values
1397             (parse-namestring (concatenate 'simple-string dir-or-error "/")             (parse-namestring (replace string dir-or-error) *unix-host*)))
                              *unix-host*)))  
1398          (error dir-or-error))))          (error dir-or-error))))
1399    
1400    
1401    
1402    
1403  ;;; %Set-Default-Directory  --  Internal  ;;; %Set-Default-Directory  --  Internal
1404  ;;;  ;;;
1405  (defun %set-default-directory (new-val)  (defun %set-default-directory (new-val)

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

  ViewVC Help
Powered by ViewVC 1.1.5