Ignore:
Timestamp:
Apr 14, 2011, 3:53:47 PM (8 years ago)
Author:
rme
Message:

Merge r14662 from trunk.

Closes ticket:843.

Location:
release/1.6/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/1.6/source

  • release/1.6/source/level-1/l1-sysio.lisp

    r13426 r14712  
    776776      (check-pathname-not-wild filename) ;; probe-file-x misses wild versions....
    777777      (multiple-value-bind (native-truename kind)(probe-file-x filename)
    778         (if native-truename
     778       (tagbody retry
     779        (if native-truename
    779780          (if (eq kind :directory)
    780781            (if (eq direction :probe)
     
    797798          (if (setq filename (if-does-not-exist if-does-not-exist filename))
    798799            (progn
    799               (unless (setq native-truename (%create-file filename :if-exists if-exists))
    800                 (return-from open nil))
     800              (unless (setq native-truename (%create-file filename :if-exists (case if-exists
     801                                                                                ;; Let %create file handle these cases
     802                                                                                ((:error :overwrite) if-exists)
     803                                                                                (t nil))))
     804                ;; Somebody else created the file while we're trying to create it.
     805                (when (null if-exists) (return-from open nil))
     806                (multiple-value-setq (native-truename kind) (probe-file-x filename))
     807                (unless native-truename ;; huh?  Perhaps it disappeared again?
     808                  (error "Attempt to create ~s failed unexpectedly" filename))
     809                (go retry))
    801810              (setq created t))
    802             (return-from open nil)))
     811            (return-from open nil))))
    803812        (let* ((fd (fd-open native-truename (case direction
    804813                                              ((:probe :input) #$O_RDONLY)
Note: See TracChangeset for help on using the changeset viewer.