mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Use LocalFileName class for file names inside a package.
This commit is contained in:
@@ -112,16 +112,16 @@ void read_mse1_card(Set& set, wxFileInputStream& f, wxTextInputStream& file) {
|
||||
card->value<TextValue>(_("name")) .value.assign(line);
|
||||
break;
|
||||
} case 'C': case 'D': { // image filename
|
||||
String image_file = set.newFileName(_("image"),_("")); // a new unique name in the package
|
||||
LocalFileName image_file = set.newFileName(_("image"),_("")); // a new unique name in the package
|
||||
if (wxCopyFile(line, set.nameOut(image_file), true)) {
|
||||
card->value<ImageValue>(_("image")) .filename = image_file;
|
||||
card->value<ImageValue>(_("image")).filename = image_file;
|
||||
}
|
||||
break;
|
||||
} case 'E': { // super type
|
||||
card->value<TextValue>(_("super type")) .value.assign(line);
|
||||
card->value<TextValue>(_("super type")).value.assign(line);
|
||||
break;
|
||||
} case 'F': { // sub type
|
||||
card->value<TextValue>(_("sub type")) .value.assign(line);
|
||||
card->value<TextValue>(_("sub type")).value.assign(line);
|
||||
break;
|
||||
} case 'G': { // casting cost
|
||||
card->value<TextValue>(_("casting cost")).value.assign(line);
|
||||
|
||||
@@ -152,7 +152,7 @@ SetP MtgEditorFileFormat::importSet(const String& filename) {
|
||||
}
|
||||
// copy image into set
|
||||
if (wxFileExists(line)) {
|
||||
String image_file = set->newFileName(_("image"),_(""));
|
||||
LocalFileName image_file = set->newFileName(_("image"),_(""));
|
||||
if (wxCopyFile(line, set->nameOut(image_file), true)) {
|
||||
current_card->value<ImageValue>(_("image")).filename = image_file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user