-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maps are not be saved when created with DOOMEdit if the "." is in the file path. #299
Comments
It appears this happens with any map that is saved DOOMEdit, not just maps missing the .map post-fix (as was previously stated. |
Note: The File>Save Selected command functions properly? |
As a note, #301 had an issue with a period in the file path, that is likely the root cause of this issue as well. |
idStr::StripFileExtension() (and SetFileExtension() which uses it) and others didn't work correctly if there was a dot in a directory name, because they just searched from last to first char for '.', so if the current filename didn't have an extension to cut off, they'd just cut off at any other '.' they found. So D:\dev\doom3.data\base\maps\bla could turn into D:\dev\doom3 (or, for SetFileExtension(), D:\dev\doom3.map) While at it, I made most of the idStr code that explicitly checked for '\\' and '/' (and maybe ':' for AROS) use a little "bool isDirSeparator(int c)" function so we don't have the #ifdefs for different platforms all over the place.
idStr::StripFileExtension() (and SetFileExtension() which uses it) and others didn't work correctly if there was a dot in a directory name, because they just searched from last to first char for '.', so if the current filename didn't have an extension to cut off, they'd just cut off at any other '.' they found. So D:\dev\doom3.data\base\maps\bla could turn into D:\dev\doom3 (or, for SetFileExtension(), D:\dev\doom3.map) While at it, I made most of the idStr code that explicitly checked for '\\' and '/' (and maybe ':' for AROS) use a little "bool isDirSeparator(int c)" function so we don't have the #ifdefs for different platforms all over the place.
This issue no longer reproduces in dhewm3_1.5.1_RC1-editorfixes2_win32.zip |
bug is still closed, changing the actual name to make it more clear in case of regressions. |
idStr::StripFileExtension() (and SetFileExtension() which uses it) and others didn't work correctly if there was a dot in a directory name, because they just searched from last to first char for '.', so if the current filename didn't have an extension to cut off, they'd just cut off at any other '.' they found. So D:\dev\doom3.data\base\maps\bla could turn into D:\dev\doom3 (or, for SetFileExtension(), D:\dev\doom3.map) While at it, I made most of the idStr code that explicitly checked for '\\' and '/' (and maybe ':' for AROS) use a little "bool isDirSeparator(int c)" function so we don't have the #ifdefs for different platforms all over the place.
On Windows 10 64-bit when saving a map created with DoomEdit no file will be generated.
Repro steps:
Notes:
This does not occur in the original Doom3 DOOMEdit, the map is saved properly (although an error message is generated, the map saves properly).
To make a box map:
The text was updated successfully, but these errors were encountered: