diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala index 4d5d378df..c23176e73 100644 --- a/libdino/src/service/file_manager.vala +++ b/libdino/src/service/file_manager.vala @@ -46,9 +46,12 @@ public class FileManager : StreamInteractionModule, Object { return ret; } - // Required to allow Windows users to receive files with illegal characters in name private string sanitize_filename(string filename) { +#if _WIN32 GLib.Regex regex = new GLib.Regex("[<>:\"/\\|?*]"); +#else + GLib.Regex regex = new GLib.Regex("[/\\x{00}]"); +#endif return regex.replace(filename, -1, 0, "_"); }