-
Notifications
You must be signed in to change notification settings - Fork 265
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
Exporting a campaign with too short a name throws exception #1269
Comments
Is this specific to short names or the timing after starting MapTool? Appears to be just a short name issue. |
Yes: I thought it had to do with the timing (and the fact that the campaign was not saved yet) but it turned out that you could reproduce the same also with a saved campaign. |
Note that this is for the File -> Export action only. |
If I remember right, it is related to the file extension. |
Correct, the problem is in the AppState.getCampaignName:
As you can see, this assumes that the name has always an extension. Not posting a fix for this now because I will be busy with other stuff during the week; if this is still active during the week-end, I will create a fix for it :) |
…ame in Export and Save This is a fix for RPTools#1269. Since code between Export As and Save As is very similar, it has been refactored out as much as possible. This also fixes a problem in the Save As function: if you try to save the campaign as c1, it checks if c1 exists, but then saves it as c1.cmpgn. Fixed. Manual test cases: Test Cases: Export: - existing file, no extension => OK - not existing file, extension => OK - not existing file, no extension => OK - existing file, extension => OK Save: - existing file, no extension => OK - not existing file, extension => OK - not existing file, no extension => OK - existing file, extension => OK Refers to RPTools#1269
Refers to RPTools#1269
Tested. Exporting campaign files with as few as 1 character file names works as expected. |
Describe the bug
Exporting a campaign with a short name causes an error
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The campaign to be saved as c1.cmpgn
Screenshots
Attached screenshot of the error
MapTool Info
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: