]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/files.el (create-file-buffer): Fix last change (bug#62732).
authorEli Zaretskii <eliz@gnu.org>
Mon, 17 Jul 2023 11:34:35 +0000 (14:34 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 17 Jul 2023 11:34:35 +0000 (14:34 +0300)
lisp/files.el

index 4b65ff10b68641e120562a36e20cd3c02b443437..0c08250a7e932b7eebcc3cc9aec295bea3319cc4 100644 (file)
@@ -2094,6 +2094,8 @@ Emacs treats buffers whose names begin with a space as internal buffers.
 To avoid confusion when visiting a file whose name begins with a space,
 this function prepends a \"|\" to the final result if necessary."
   (let* ((lastname (file-name-nondirectory (directory-file-name filename)))
+         (lastname (if (string= lastname "")
+                       filename lastname))
          (lastname (cond
                     ((not (and uniquify-trailing-separator-p
                                (file-directory-p filename)))