ensure image and text filename are legal Windows filenames by replacing reserved characters with underscore
parent
76ff585fbf
commit
d07f2c355e
|
@ -171,7 +171,8 @@ public class MagicCardDefinition implements MagicAbilityStore {
|
|||
public String getImageName() {
|
||||
return token ?
|
||||
CardDefinitions.getCanonicalName(fullName) :
|
||||
fullName;
|
||||
// replace Windows reserved characters with underscore
|
||||
fullName.replaceAll("[<>:\"/\\\\|?*\\x00-\\x1F]", "_");
|
||||
}
|
||||
|
||||
public void setImageCount(final int count) {
|
||||
|
|
Loading…
Reference in New Issue