/[meta-cvs]/meta-cvs/F-6BD7679FED76D6E5A7D36DC36C205FC1.lisp
ViewVC logotype

Diff of /meta-cvs/F-6BD7679FED76D6E5A7D36DC36C205FC1.lisp

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

revision 1.9.2.9 by kaz, Thu Jan 8 15:34:05 2004 UTC revision 1.9.2.10 by kaz, Sun Feb 1 05:10:15 2004 UTC
# Line 123  Line 123 
123      `(let ((,saved-dir (unix-funcs:open "." unix-funcs:o-rdonly 0)))      `(let ((,saved-dir (unix-funcs:open "." unix-funcs:o-rdonly 0)))
124         (when (= ,saved-dir -1)         (when (= ,saved-dir -1)
125           (error (make-condition 'open-error :path ".")))           (error (make-condition 'open-error :path ".")))
126         (unwind-protect (progn ,@forms)         (unwind-protect
127                         (fchdir ,saved-dir)           (macrolet ((in-original-dir (&body inner-forms)
128                         (unix-funcs:close ,saved-dir)))))                        (let ((in-saved-dir (gensym "INNER-SAVED-DIR-")))
129                            `(let ((,in-saved-dir
130                                     (unix-funcs:open "."
131                                                      unix-funcs:o-rdonly
132                                                      0)))
133                               (when (= ,in-saved-dir -1)
134                                 (error (make-condition 'open-error :path ".")))
135                               (unwind-protect
136                                 (progn (fchdir ,',saved-dir)
137                                        (progn ,@inner-forms))
138                                 (fchdir ,in-saved-dir)
139                                 (unix-funcs:close ,in-saved-dir))))))
140               ,@forms)
141             (fchdir ,saved-dir)
142             (unix-funcs:close ,saved-dir)))))
143    
144  ;;; File information  ;;; File information
145    

Legend:
Removed from v.1.9.2.9  
changed lines
  Added in v.1.9.2.10

  ViewVC Help
Powered by ViewVC 1.1.5