branch: master
commit 32db847e4545483bdb08d6facdb8bb9887fb6d6d
Author: Alexey Veretennikov <alexey.veretenni...@gmail.com>
Commit: Alexey Veretennikov <alexey.veretenni...@gmail.com>

    Fixed files with spaces comparison error
---
 ztree-diff-model.el |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index d2dfd1f..a7153fc 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -112,10 +112,13 @@
       file
     (tramp-file-name-localname (tramp-dissect-file-name file))))
 
+(defun ztree-diff-modef-quotify-string (x)
+  (concat "\"" x "\""))
+
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files using external diff. Returns t if equal"
-  (let* ((file1-untrampified (ztree-diff-untrampify-filename file1))
-         (file2-untrampified (ztree-diff-untrampify-filename file2))
+  (let* ((file1-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file1)))
+         (file2-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file2)))
          (diff-command (concat "diff -q" " " file1-untrampified " " 
file2-untrampified))
          (diff-output (shell-command-to-string diff-command)))
     (not (> (length diff-output) 2))))

Reply via email to