Fix filename filtering

Android seems to think different about the \w regex flag.
Also prevent empty names by replacing it with an underscore intead of a space.
captchafix
Florens Douwes 11 years ago
parent c345bfd40e
commit e78cb75142
  1. 2
      Clover/app/src/main/java/org/floens/chan/utils/ImageSaver.java

@ -169,7 +169,7 @@ public class ImageSaver {
}
private static String filterName(String name) {
return name.replaceAll("[^\\w.]", "");
return name.replaceAll("[^a-zA-Z0-9.]", "_");
}
private static File findUnused(File start, boolean isDir) {

Loading…
Cancel
Save