summaryrefslogtreecommitdiffstats
path: root/fix-directory-file-name.patch
blob: 116fd9b780e725faf3a62b529a94f5aa21e60466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 039acb0d710ed719d2b1b395bd4207f26097b854 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement.lassieur@parrot.com>
Date: Thu, 27 Dec 2018 16:23:49 +0100
Subject: [PATCH] fix directory-file-name

---
 dropbox.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dropbox.el b/dropbox.el
index b737de7..732af78 100644
--- a/dropbox.el
+++ b/dropbox.el
@@ -379,10 +379,9 @@ dropbox-like files (/db:/something is transformed into /db:something)."
 
 (defun dropbox-handle-directory-file-name (directory)
   "Remove the final slash from a directory name"
-
-  (if (eq (aref directory (1- (length directory))) ?/)
-      (substring directory 0 -1)
-    directory))
+  (concat "/db:" (dropbox-run-real-handler
+                  'directory-file-name
+                  (list (dropbox-strip-prefix directory)))))
 
 (defun dropbox-handle-file-name-as-directory (directory)
   "Remove the final slash from a directory name"
-- 
2.19.1