files icon indicating copy to clipboard operation
files copied to clipboard

No path shown with Invalid filename error

Open peteruithoven opened this issue 2 years ago • 4 comments

Problem

When trying to copy a file with an "Invalid filename", there is no information shown on where the file is in the error dialog. This problematic when for example copying a large amount of files. Without the path a lot of context is missing.

Screenshot from 2023-03-29 13-10-03@2x

More specifically I was trying to backup my home folder and apparently there are files like: ./.cache/io.elementary.appcenter/screenshots/1cc61524.png?raw=true But now I had to use find . -name "1cc61524.png*" -print to figure this out. This happened when I was trying to backup files from a ext4 to a NTFS formatted drive.

Proposal

The details panel includes information on the path.

Prior Art (Optional)

In other cases, with for example permission issues, the path is included.

peteruithoven avatar Mar 29 '23 11:03 peteruithoven

If the file exists on the disk then it should have a valid filename (unless you were copying onto a different filesystem with different filename requirements?). We could put the full uri in the "Details" though.

jeremypw avatar Mar 29 '23 15:03 jeremypw

I did not have a problem copying a file with a name of the form "XXXXXX.png?raw=true" from one place to another on an ext4 filesystem.

jeremypw avatar Mar 29 '23 16:03 jeremypw

Ah this happened when I was trying to backup files from a ext4 to a NTFS formatted drive. I've clarified my initial post.

peteruithoven avatar Mar 29 '23 16:03 peteruithoven

Looking at the code in marlin-file-operations.c, sometimes the files_file_utils_custom_basename_from_file () is used and sometimes get_parse_name () when there is an error. You are right - we should standardise these error dialogs better.

jeremypw avatar Mar 29 '23 16:03 jeremypw