tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.3.5.26.2); Copy-paste of folder from Windows machine to Lin


From: Guillaume Demeyère
Subject: Re: tramp (2.3.5.26.2); Copy-paste of folder from Windows machine to Linux server does not work
Date: Thu, 11 Jul 2019 09:31:50 +0200

Hello Michael,

So I missed the trailing slash, very good point. However, if I forget this slash when I copy-paste on a local directory, I get  "funcall-interactively: File is a directory: c:/blabla/tmp", which seems more reasonable than a base64 error.

So I re-did the test with the trailing slash, and it does work, indeed.

I also noticed that, when tramp-inline-compress-start-size is *not* nil, the error only appears on certain files : the  copy works well on others. That's why I suspect an encoding error. To make my point, I ran the test on two different files : Main.js and file1.txt. On file1.txt (only text), the copy-paste works. On Main.js (JS file), the copy-paste fails.

In detail, here are the two scenarii I ran:

Scenario 1, No compression (everything works fine - see "no-compression-log"):

(setq tramp-verbose 10)
(setq tramp-inline-compress-start-size nil)
(copy-file "c:/Users/gde3/Documents/tmp/file1.txt" "/plink:nxuser@vdemopro892dsy|su:root@vdemopro892dsy:/home/data/RTV/DEMOR421/apache-tomcat/webapps/3DSpace/webapps/test/")
(copy-file "c:/Users/gde3/Documents/BTWW-Widgets-4-3DSpace-master/Widgets/UM5GraphVue/scripts/Main.js" "/plink:nxuser@vdemopro892dsy|su:root@vdemopro892dsy:/home/data/RTV/DEMOR421/apache-tomcat/webapps/3DSpace/webapps/test/")

Scenario 2, with compression (the second copy fails - "with-compression-log)
(setq tramp-verbose 10)
(copy-file "c:/Users/gde3/Documents/tmp/file1.txt" "/plink:nxuser@vdemopro892dsy|su:root@vdemopro892dsy:/home/data/RTV/DEMOR421/apache-tomcat/webapps/3DSpace/webapps/test/")
(copy-file "c:/Users/gde3/Documents/BTWW-Widgets-4-3DSpace-master/Widgets/UM5GraphVue/scripts/Main.js" "/plink:nxuser@vdemopro892dsy|su:root@vdemopro892dsy:/home/data/RTV/DEMOR421/apache-tomcat/webapps/3DSpace/webapps/test/")

Regards,

Guillaume

Michael Albinus <address@hidden> escreveu no dia quarta, 10/07/2019 à(s) 17:20:
Guillaume Demeyère <address@hidden> writes:

> Hello Michael,

Hi Guillaume,

> I'm not sure if it's safe to send this level of detail on a mailing
> list, so I'm sending it privately. I'm working on a company computer
> (that's why it's a Windows), and I'd rather not do anything considered
> unsafe by my company regulations.

No problem. I've re-added address@hidden, because it is a pilot
error, and I would like to share the analysis for the archives. In my
analysis, there are no confidential data.

According to the backtrace in Tramp's debug buffer with debug level 10,
you have called interactively:

(copy-file "c:/Users/censored/Main.js" "/plink:user@host|su:root@host:/home/censored/test" 1 nil)

This is wrong, because this invocation of copy-file expects .../test to
be a file, and not a directory. See the docstring of copy-file:

--8<---------------cut here---------------start------------->8---
(copy-file FILE NEWNAME &optional OK-IF-ALREADY-EXISTS KEEP-TIME
PRESERVE-UID-GID PRESERVE-PERMISSIONS)

Copy FILE to NEWNAME.  Both args must be strings.
If NEWNAME is a directory name, copy FILE to a like-named file under
NEWNAME.  For NEWNAME to be recognized as a directory name, it should
end in a slash.
--8<---------------cut here---------------end--------------->8---

If you want to copy a file to a directory, you must call instead

(copy-file "c:/Users/censored/Main.js" "/plink:user@host|su:root@host:/home/censored/test/" 1 nil)

Pls try it again. Keep the change for tramp-inline-compress-start-size.

> Best regards,
>
> Guillaume

Best regards, Michael.

Attachment: 2019-07-11-9h28-with-compression-tramp-log
Description: Binary data

Attachment: 2019-07-11-9h13-no-compression-tramp-log
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]