mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Remove NUL characters from file names
This commit is contained in:
@@ -1012,7 +1012,10 @@ public class Helper {
|
||||
if (name == null)
|
||||
return null;
|
||||
|
||||
return name.replaceAll("[?:\"*|/\\\\<>]", "_");
|
||||
return name
|
||||
// Canonical files names cannot contain NUL
|
||||
.replace("\0", "")
|
||||
.replaceAll("[?:\"*|/\\\\<>]", "_");
|
||||
}
|
||||
|
||||
static String getExtension(String filename) {
|
||||
|
||||
Reference in New Issue
Block a user