Use nondirectory instead of base

This way a project directories with a `.' (dot) in them won't have the
last part stripped.
This commit is contained in:
Tom Willemse 2014-01-19 14:58:07 +01:00
parent d5feb53a4e
commit 6cc4ba1387

View file

@ -87,7 +87,7 @@ Returns DEFAULT when `desktop-dirname' is nil."
(if (equal current-prefix-arg '(4)) (if (equal current-prefix-arg '(4))
(read-string "Name: ")))) (read-string "Name: "))))
(let* ((clean-dir (desktop-registry--canonicalize-dir dir)) (let* ((clean-dir (desktop-registry--canonicalize-dir dir))
(label (or name (file-name-base clean-dir)))) (label (or name (file-name-nondirectory clean-dir))))
(cond (cond
((cl-find clean-dir desktop-registry-registry ((cl-find clean-dir desktop-registry-registry
:key 'cdr :test 'equal) :key 'cdr :test 'equal)