mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 14:07:01 -04:00
Fixed bug caused by case sensitivity of filenames in newFileName
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@978 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -219,10 +219,11 @@ OutputStreamP Package::openOut(const String& file) {
|
|||||||
|
|
||||||
String Package::nameOut(const String& file) {
|
String Package::nameOut(const String& file) {
|
||||||
assert(wxThread::IsMain()); // Writing should only be done from the main thread
|
assert(wxThread::IsMain()); // Writing should only be done from the main thread
|
||||||
FileInfos::iterator it = files.find(file);
|
String name = normalize_internal_filename(file);
|
||||||
|
FileInfos::iterator it = files.find(name);
|
||||||
if (it == files.end()) {
|
if (it == files.end()) {
|
||||||
// new file
|
// new file
|
||||||
it = addFile(file);
|
it = addFile(name);
|
||||||
}
|
}
|
||||||
// return stream
|
// return stream
|
||||||
if (it->second.wasWritten()) {
|
if (it->second.wasWritten()) {
|
||||||
@@ -244,6 +245,7 @@ FileName Package::newFileName(const String& prefix, const String& suffix) {
|
|||||||
name = prefix;
|
name = prefix;
|
||||||
name << ++infix;
|
name << ++infix;
|
||||||
name += suffix;
|
name += suffix;
|
||||||
|
name = normalize_internal_filename(name);
|
||||||
// check if a file with that name exists
|
// check if a file with that name exists
|
||||||
FileInfos::iterator it = files.find(name);
|
FileInfos::iterator it = files.find(name);
|
||||||
if (it == files.end()) {
|
if (it == files.end()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user