Hi Juergen, there are still 3 other patches in my queue; they are appended. I have the feeling that's all for now, there's nothing left on my todo list.
You might also update README.md; the Tramp handlers related problems shall be solved now. Have fun with your tramp-adb.el, and you're welcome back on the list in case of problems. Best regards, Michael.
>From 7f1c0cff96ba80b31e5470e039a5bb064b27eef7 Mon Sep 17 00:00:00 2001 From: Michael Albinus <[email protected]> Date: Tue, 7 Jun 2011 12:18:19 +0200 Subject: [PATCH 1/3] Fix `tramp-adb-handle-file-directory-p' and `tramp-adb-handle-make-directory'. --- tramp-adb.el | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tramp-adb.el b/tramp-adb.el index d7d1915..72178d2 100644 --- a/tramp-adb.el +++ b/tramp-adb.el @@ -179,10 +179,7 @@ pass to the OPERATION." (defun tramp-adb-handle-file-directory-p (filename) "Like `file-directory-p' for Tramp files." - (let ((symlink (file-symlink-p filename))) - (if (stringp symlink) - (file-directory-p symlink) - (car (file-attributes filename))))) + (car (file-attributes (file-truename filename)))) ;; This is derived from `tramp-sh-handle-file-truename'. Maybe the ;; code could be shared? @@ -392,8 +389,9 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (setq dir (expand-file-name dir)) (with-parsed-tramp-file-name dir nil (when parents - (tramp-message - v 5 "mkdir doesn't handle \"-p\" switch: mkdir \"%s\"" localname)) + (let ((par (expand-file-name ".." dir))) + (unless (file-directory-p par) + (make-directory par parents)))) (tramp-adb-barf-unless-okay v (format "mkdir %s" (tramp-shell-quote-argument localname)) "Couldn't make directory %s" dir) @@ -458,8 +456,9 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (defun tramp-adb-handle-file-writable-p (filename) (with-parsed-tramp-file-name filename nil - ;; missing "test" command on Android devices - (tramp-message v 5 "not implemented yet (Assuming /data/data is writable) :%s" localname) + ;; Missing "test" command on Android devices. + (tramp-message + v 5 "not implemented yet (Assuming /data/data is writable) :%s" localname) (let ((rw-path "/data/data")) (and (>= (length localname) (length rw-path)) (string= (substring localname 0 (length rw-path)) @@ -515,7 +514,7 @@ PRESERVE-UID-GID and PRESERVE-SELINUX-CONTEXT are completely ignored." newname (expand-file-name newname)) (if (file-directory-p filename) - (copy-directory filename newname keep-date) + (copy-directory filename newname keep-date t) (tramp-with-progress-reporter (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) 0 (format "Copying %s to %s" filename newname) -- 1.7.4.1
>From 46af11b9bf0849f39d9b683eb88e3938f745efb1 Mon Sep 17 00:00:00 2001 From: Michael Albinus <[email protected]> Date: Thu, 9 Jun 2011 18:43:08 +0200 Subject: [PATCH 2/3] Use `file-truename' in `tramp-adb-handle-insert-directory'. --- tramp-adb.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tramp-adb.el b/tramp-adb.el index 72178d2..c56c3af 100644 --- a/tramp-adb.el +++ b/tramp-adb.el @@ -316,7 +316,7 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." "Like `insert-directory' for Tramp files." (when (stringp switches) (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches)))) - (with-parsed-tramp-file-name (expand-file-name filename) nil + (with-parsed-tramp-file-name (file-truename filename) nil (with-current-buffer (tramp-get-buffer v) (let ((name (tramp-shell-quote-argument (directory-file-name localname))) (switch-d (member "-d" switches)) -- 1.7.4.1
>From 21fc40f30b770d92fef9229f1d52f245f8b41fa0 Mon Sep 17 00:00:00 2001 From: Michael Albinus <[email protected]> Date: Thu, 9 Jun 2011 19:04:08 +0200 Subject: [PATCH 3/3] Use `file-truename' in `tramp-adb-handle-file-local-copy'. --- tramp-adb.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tramp-adb.el b/tramp-adb.el index c56c3af..388f5f2 100644 --- a/tramp-adb.el +++ b/tramp-adb.el @@ -440,7 +440,7 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." (defun tramp-adb-handle-file-local-copy (filename) "Like `file-local-copy' for Tramp files." (with-parsed-tramp-file-name filename nil - (unless (file-exists-p filename) + (unless (file-exists-p (file-truename filename)) (tramp-error v 'file-error "Cannot make local copy of non-existing file `%s'" filename)) -- 1.7.4.1
_______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
