Remove trailing spaces in filenames

FAT does not support trailing spaces, so we must remove them
This commit is contained in:
LatinSuD 2013-03-24 17:47:13 +01:00
parent 498d8dbf1e
commit 1e58e41ba7
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class FileNameGenerator {
for (int i = 0; i < string.length(); i++) {
char c = string.charAt(i);
if (Arrays.binarySearch(ILLEGAL_CHARACTERS, c) < 0) {
builder.append(c);
builder.append(c).replaceFirst(" *$","");
}
}
return builder.toString();