summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorignapk <automat.script@gmail.com>2020-07-12 20:49:01 +0200
committerignapk <automat.script@gmail.com>2020-07-13 16:15:19 +0200
commitc028e48e589d07360c7ea8939a7b334948ca0e0c (patch)
treecb983b0a708c1eb9ab49d57ea00cfd1facadde21
parentf03cb9f79a2f005326834dc082dfbae4e0a4b786 (diff)
downloadnautilus-c028e48e589d07360c7ea8939a7b334948ca0e0c.tar.gz
file-operations: auto-escape filenames on fuseblk mounts
Currently when copying files that have reserved characters in their names to NTFS or exFAT filesystems mounted using FUSE, the process will fail. The fuseblk filesystem type could be of any type in theory, but in practice is usually NTFS or exFAT, so make the assumption in pragmatic way to solve this issue. Closes #1343
-rw-r--r--src/nautilus-file-operations.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 4e8e0224c..3f98caedd 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -4214,6 +4214,11 @@ make_file_name_valid_for_dest_fs (char *filename,
{
if (!strcmp (dest_fs_type, "fat") ||
!strcmp (dest_fs_type, "vfat") ||
+ /* The fuseblk filesystem type could be of any type
+ * in theory, but in practice is usually NTFS or exFAT.
+ * This assumption is a pragmatic way to solve
+ * https://gitlab.gnome.org/GNOME/nautilus/-/issues/1343 */
+ !strcmp (dest_fs_type, "fuse") ||
!strcmp (dest_fs_type, "ntfs") ||
!strcmp (dest_fs_type, "msdos") ||
!strcmp (dest_fs_type, "msdosfs"))