diff options
-rw-r--r-- | src/io/io_worker.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io/io_worker.rs b/src/io/io_worker.rs index 4346437..189e9fc 100644 --- a/src/io/io_worker.rs +++ b/src/io/io_worker.rs @@ -356,7 +356,11 @@ fn trash_file<P>(file_path: P) -> AppResult where P: AsRef<path::Path>, { - let file_path_str = file_path.as_ref().as_os_str().to_string_lossy(); + let file_path_str = file_path + .as_ref() + .as_os_str() + .to_string_lossy() + .replace('\'', "'\\''"); let clipboards = [ ("gio trash", format!("gio trash -- '{}'", file_path_str)), |