diff options
author | Leonid Movshovich <event.riga@gmail.com> | 2015-01-18 10:04:52 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2015-01-18 10:04:52 +0100 |
commit | 7be8f49a95a528e4c46df0cfe26877457c95ac0e (patch) | |
tree | 02fcd3e36a81e297db5a674c5d2dec66edd6cebf /lib | |
parent | 05b3de5cb40374e36e020180e24829cba7e6cc90 (diff) | |
download | quilt-7be8f49a95a528e4c46df0cfe26877457c95ac0e.tar.gz |
quilt-el: Fix tramp support
quilt-find-dir goes to endless recursion if root is not '/'. This
holds for files opened with tramp for example.
Reviewed and tested by Satoru Takeuchi.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/quilt.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/quilt.el b/lib/quilt.el index 6fe1c32..0a57b05 100644 --- a/lib/quilt.el +++ b/lib/quilt.el @@ -45,14 +45,14 @@ (or (getenv "QUILT_PATCHES") "patches"))) -(defun quilt-find-dir (fn) +(defun quilt-find-dir (fn &optional prefn) "Return the top level dir of quilt from FN." - (if (or (not fn) (equal fn "/")) + (if (or (not fn) (equal fn "/") (equal fn prefn)) nil (let ((d (file-name-directory fn))) (if (file-accessible-directory-p (concat d "/.pc")) d - (quilt-find-dir (directory-file-name d)))))) + (quilt-find-dir (directory-file-name d) d))))) (defun quilt-dir (&optional fn) "Return the top level dir of quilt from FN. FN is just a hint and find from other way if FN is nil." |