mirror of https://github.com/M66B/FairEmail.git
Remove NUL characters from file names
This commit is contained in:
parent
70b868cc41
commit
43d7dc2c8e
|
@ -1012,7 +1012,10 @@ public class Helper {
|
||||||
if (name == null)
|
if (name == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return name.replaceAll("[?:\"*|/\\\\<>]", "_");
|
return name
|
||||||
|
// Canonical files names cannot contain NUL
|
||||||
|
.replace("\0", "")
|
||||||
|
.replaceAll("[?:\"*|/\\\\<>]", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getExtension(String filename) {
|
static String getExtension(String filename) {
|
||||||
|
|
Loading…
Reference in New Issue