Subject: bug#56494: 29.0.50; Tramp: No such file ' Buongiorno A Te ' - ( Luciano Pavarotti )-Aa-NLjOsLIE.mp4

From: Michael Albinus <[email-masked]>
Date: Tue, 12 Jul 2022 16:48:36 +0200

Jean Louis <[email-masked]> writes:

Hi Jean,

> I cannot execute !rm on this file:
>
> (dired-get-filename) ⇒ "/scp:motorolausb:/storage/emulated/0/Download/' Buongiorno A Te '  -  ( Luciano Pavarotti )-Aa-NLjOsLIE.mp4"
>
> Error is:
> rm: cannot remove '/scp:motorolausb:/storage/emulated/0/Download/'\''
> Buongiorno A Te '\''  -  ( Luciano Pavarotti )-Aa-NLjOsLIE.mp4': No
> such file or directory [2 times]
>
> But file is for sure there:
>
> It is displayed with -al switches as following:
>
>   /scp:motorolausb:/storage/emulated/0/Download:
>   -rw-rw----  1 root everybody 22897869 May 20 17:29 ' Buongiorno A Te '  -  ( Luciano Pavarotti )-Aa-NLjOsLIE.mp4
>   drwxrwx---  2 root everybody     4096 Jul 11 10:50 .
>   drwxrwx--- 23 root everybody     4096 Jul  8 11:47 ..

How do you have called !rm? Via "! rm RET" in dired? This shall work.

Note, that (dired-get-filename) returns the full remote file name, which
cannot be given to any remote process as argument. If you want to use
this programmatically, you must call (file-local-name (dired-get-filename))

Best regards, Michael.