[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tramp/ange-ftp problem when copying into directory shown in dired buffer
From: |
Urban Engberg |
Subject: |
tramp/ange-ftp problem when copying into directory shown in dired buffer |
Date: |
Mon, 22 Nov 2004 15:03:13 +0100 |
(Using tramp for uploading files to an ftp-server.)
To recreate:
Open a remote directory, as e.g.
C-x d /ftp:address@hidden:/mydir
Then, open a local version of mydir, let's say
C-x d ~/mydir
In the local mydir, set point on the file "xxx.txt" and type
C
entering the remote location
/ftp:address@hidden:/mydir
I get the error:
Copy [-p] `/usr/acct/ue/mydir/xxx.txt' to
`/ftp:address@hidden:/mydir/xxx.txt' failed:
(ftp-error FTP Error: DIR failed: 550 /mydir/xxx.txt: Not a directory.)
The problem seems to be that dired-insert-directory wants to insert
the file xxx.txt into the remote dired buffer, and instructs tramp to
do so by doing a
insert-directory("xxx.txt" "--dired -ald" nil nil)
This is not handled correctly by tramp/ange-ftp however, as it tries to
cd to xxx.txt as if it was a directory.
The copy operation is performed correctly; it is just the updating of
the remote dired buffer that fails.
Using edebug on ange-ftp-cd, I get the stack
ange-ftp-cd("localhost" "urban" "/mydir/xxx.txt" noerror)
ange-ftp-send-cmd("localhost" "urban" (dir "/mydir/xxx.txt"
"/tmp/ange-ftp2288uUR" "-ald") "Listing xxx.txt")
ange-ftp-ls("xxx.txt" "--dired -ald" nil)
ange-ftp-insert-directory("xxx.txt" "--dired -ald" nil nil)
apply(ange-ftp-insert-directory ("xxx.txt" "--dired -ald" nil nil))
ange-ftp-hook-function(insert-directory "xxx.txt" "--dired -ald" nil nil)
apply(ange-ftp-hook-function insert-directory ("xxx.txt" "--dired -ald" nil
nil))
tramp-ftp-file-name-handler(insert-directory "xxx.txt" "--dired -ald" nil nil)
apply(tramp-ftp-file-name-handler insert-directory ("xxx.txt" "--dired -ald"
nil nil))
tramp-file-name-handler(insert-directory "xxx.txt" "--dired -ald" nil nil)
insert-directory("xxx.txt" "--dired -ald" nil nil)
(let ((beg ...)) (insert-directory f switches nil nil) (dired-align-file beg
(point)))
(while --cl-dolist-temp-- (setq f (car --cl-dolist-temp--)) (let (...)
(insert-directory f switches nil nil) (dired-align-file beg ...)) (setq
--cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- file-list) f) (while --cl-dolist-temp-- (setq f
...) (let ... ... ...) (setq --cl-dolist-temp-- ...)) nil)
(catch (quote --cl-block-nil--) (let (... f) (while --cl-dolist-temp-- ...
... ...) nil))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
(block nil (let (... f) (while --cl-dolist-temp-- ... ... ...) nil))
(dolist (f file-list) (let (...) (insert-directory f switches nil nil)
(dired-align-file beg ...)))
(if file-list (dolist (f file-list) (let ... ... ...)) (insert-directory dir
switches wildcard (not wildcard)))
(let ((opoint ...) (process-environment ...) end) (if (or dired-use-ls-dired
...) (setq switches ...)) (if file-list (dolist ... ...) (insert-directory dir
switches wildcard ...)) (if (not ...) (save-excursion ... ... ... ... ... ...))
(dired-insert-set-properties opoint (point)) (unless (save-excursion ... ...)
(let ... ...)) (save-excursion (goto-char opoint) (if ... ...) (when wildcard
...)))
dired-insert-directory("/ftp:address@hidden:/mydir/" "-ald" ("xxx.txt"))
(let ((default-directory directory)) (dired-insert-directory directory
(concat dired-actual-switches "d") (list filename)))
(let (buffer-read-only opoint) (beginning-of-line) (setq opoint (point)) (let
(...) (dired-insert-directory directory ... ...)) (goto-char opoint) (when
marker-char (let ... ...)) (goto-char opoint) (let (...) (if ... ... ...))
(forward-line -1) (if dired-after-readin-hook (save-excursion ...))
(dired-move-to-filename))
(catch (quote not-found) (if (string= directory cur-dir) (progn ... ... ...)
(if ... ... ...)) (let (buffer-read-only opoint) (beginning-of-line) (setq
opoint ...) (let ... ...) (goto-char opoint) (when marker-char ...) (goto-char
opoint) (let ... ...) (forward-line -1) (if dired-after-readin-hook ...)
(dired-move-to-filename)) nil)
(setq filename (if relative (file-relative-name filename directory)
(file-name-nondirectory filename)) reason (catch (quote not-found) (if ... ...
...) (let ... ... ... ... ... ... ... ... ... ... ...) nil))
(let* ((opoint ...) (cur-dir ...) (orig-file-name filename) (directory ...)
reason) (setq filename (if relative ... ...) reason (catch ... ... ... nil))
(if reason (goto-char opoint)) (not reason))
dired-add-entry("/ftp:address@hidden:/mydir/xxx.txt" 67)
apply(dired-add-entry ("/ftp:address@hidden:/mydir/xxx.txt" 67))
dired-fun-in-all-buffers("/ftp:address@hidden:/mydir/" "xxx.txt"
dired-add-entry "/ftp:address@hidden:/mydir/xxx.txt" 67)
dired-add-file("/ftp:address@hidden:/mydir/xxx.txt" 67)
byte-code(" \n#\210\f\203 \306\n!\210
T\307\310\n
$\210\311\n\f\"\207" [file-creator from to dired-overwrite-confirmed
overwrite success-count dired-remove-file message "%s: %d of %d" dired-add-file
operation total actual-marker-char] 5)
#[(from) " !\211 \232\203 \306\307\310\227 #\210\n\204 \311
!\fB\211\207\312\n!\211\2050 \313\314\315\316\n#)\250\203= \202I \203H \317
!\202I \306\320\321\322\217+\207" [name-constructor from to operation
skipped overwrite nil dired-log "Cannot %s to same file: %s\n"
dired-make-relative file-exists-p (format "Type SPC or `y' to overwrite file
`%s',\nDEL or `n' to skip to next,\nESC or `q' to not overwrite any of the
remaining files,\n`!' to overwrite all remaining files with no more questions."
to) dired-query overwrite-query "Overwrite `%s'?" dired-file-marker err
(byte-code " \n#\210\f\203 \306\n!\210
T\307\310\n
$\210\311\n\f\"\207" [file-creator from to dired-overwrite-confirmed
overwrite success-count dired-remove-file message "%s: %d of %d" dired-add-file
operation total actual-marker-char] 5) (...) help-form
dired-overwrite-confirmed marker-char actual-marker-char]
5]("/usr/acct/ue/mydir/xxx.txt")
mapcar(#[(from) " !\211 \232\203 \306\307\310\227
#\210\n\204 \311
!\fB\211\207\312\n!\211\2050 \313\314\315\316\n#)\250\203= \202I \203H \317
!\202I \306\320\321\322\217+\207" [name-constructor from to operation
skipped overwrite nil dired-log "Cannot %s to same file: %s\n"
dired-make-relative file-exists-p (format "Type SPC or `y' to overwrite file
`%s',\nDEL or `n' to skip to next,\nESC or `q' to not overwrite any of the
remaining files,\n`!' to overwrite all remaining files with no more questions."
to) dired-query overwrite-query "Overwrite `%s'?" dired-file-marker err
(byte-code " \n#\210\f\203 \306\n!\210
T\307\310\n
$\210\311\n\f\"\207" [file-creator from to dired-overwrite-confirmed
overwrite success-count dired-remove-file message "%s: %d of %d" dired-add-file
operation total actual-marker-char] 5) (...) help-form
dired-overwrite-confirmed marker-char actual-marker-char] 5]
("/usr/acct/ue/mydir/xxx.txt"))
dired-create-files(dired-copy-file "Copy [-p]" ("/usr/acct/ue/mydir/xxx.txt")
#[(from) "\302\303! \"\207" [from target expand-file-name
file-name-nondirectory] 3] 67)
dired-do-create-files(copy dired-copy-file "Copy [-p]" nil 67 nil nil)
dired-do-copy(nil)
call-interactively(dired-do-copy)
In GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2004-11-16 on uelinux
Distributor `The XFree86 Project, Inc', version 11.0.40201000
configured using `configure 'CFLAGS=-g -v''
Important settings:
value of $LC_ALL: en_US.iso885915
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
locale-coding-system: iso-latin-9
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-topic-mode: t
gnus-undo-mode: t
auto-image-file-mode: t
auto-compression-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
temp-buffer-resize-mode: t
column-number-mode: t
line-number-mode: t
--
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tramp/ange-ftp problem when copying into directory shown in dired buffer,
Urban Engberg <=