"1.0.41.2": threads: Add memory-barrier framework.
[sbcl.git] / src / code / win32-pathname.lisp
index 80ea088..a982f68 100644 (file)
@@ -20,7 +20,7 @@
         (cond ((and (eql c1 #\:) (alpha-char-p c0))
                ;; "X:" style, saved as X
                (values (string (char namestr start)) (+ start 2)))
-              ((and (member c0 '(#\/ #\\)) (eql c0 c1))
+              ((and (member c0 '(#\/ #\\)) (eql c0 c1) (>= end (+ start 3)))
                ;; "//UNC" style, saved as UNC
                ;; FIXME: at unparsing time we tell these apart by length,
                ;; which seems a bit lossy -- presumably one-letter UNC
         (directory (pathname-directory pathname)))
     (cond ((or (null device) (eq device :unspecific))
            "")
-          ((= 1 (length device))
+          ((and (= 1 (length device)) (alpha-char-p (char device 0)))
            (concatenate 'simple-string device ":"))
           ((and (consp directory) (eq :relative (car directory)))
            (error "No printed representation for a relative UNC pathname."))