diff lisp/files.el @ 20094:583c3ace07bf

(file-name-non-special): If "/:" is the entire file name, make it "/" after stripping.
author Karl Heuer <kwzh@gnu.org>
date Sun, 19 Oct 1997 20:34:22 +0000
parents c8448efca727
children 496ecb0c5e68
line wrap: on
line diff
--- a/lisp/files.el	Sun Oct 19 20:20:15 1997 +0000
+++ b/lisp/files.el	Sun Oct 19 20:34:22 1997 +0000
@@ -3104,10 +3104,13 @@
     ;; Strip off the /: from the file names that have this handler.
     (save-match-data
       (while (consp file-arg-indices)
-	(and (nth (car file-arg-indices) arguments)
-	     (string-match "\\`/:" (nth (car file-arg-indices) arguments))
-	     (setcar (nthcdr (car file-arg-indices) arguments)
-		     (substring (nth (car file-arg-indices) arguments) 2)))
+	(let ((pair (nthcdr (car file-arg-indices) arguments)))
+	  (and (car pair)
+	       (string-match "\\`/:" (car pair))
+	       (setcar pair
+		       (if (= (length (car pair)) 2)
+			   "/"
+			 (substring (car pair) 2)))))
 	(setq file-arg-indices (cdr file-arg-indices))))
     (if (eq file-arg-indices 'identity)
 	(car arguments)