mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Remove NUL characters from file names
This commit is contained in:
parent
70b868cc41
commit
43d7dc2c8e
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue