mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: valid non-ASCII characters get removed from downloaded file name #745
This commit is contained in:
parent
ae2745fdb7
commit
a7e102ffc7
@ -48,6 +48,6 @@ abstract class PrimitiveUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static String toSafeFileName(String str) {
|
static String toSafeFileName(String str) {
|
||||||
return str.replaceAll(RegExp(r'[^\w\s\.\-_]'), "_");
|
return str.replaceAll(RegExp(r'[/\?%*:|"<>]'), ' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user