WindEditor icon indicating copy to clipboard operation
WindEditor copied to clipboard

Opening a incorrectly formatted wrkDir crashes.

Open LordNed opened this issue 10 years ago • 5 comments

To replicate:

I_TestM.wrkDir\stage\stage<bdl, dat, dzb, dzs, etc.>

The extra \stage\ folder causes it to not load the dzb/etc. folders and thus all requests for chunks return null.

LordNed avatar Jun 02 '14 02:06 LordNed

Can't you just add a check to get the name of the first folder in \Stage, and if it's stage again, add it to the filepath to make \Stage\stage?

Sage-of-Mirrors avatar Jun 06 '14 20:06 Sage-of-Mirrors

I feel like the software shouldn't crash when loading a malformed wrkDir, but I don't feel like we should try to handle various cases of why it's wrong. The wrkDir is application generated so as long as they used the application to generate (and my generation code works) then the only time it's not going to work is if they have been manually editing it, at which point it's probably not our problem. :P

On Fri, Jun 6, 2014 at 1:08 PM, Sage-of-Mirrors [email protected] wrote:

Can't you just add a check to get the name of the first folder in \Stage, and if it's stage again, add it to the filepath to make \Stage\stage?

— Reply to this email directly or view it on GitHub https://github.com/LordNed/WindEditor/issues/3#issuecomment-45378904.

LordNed avatar Jun 07 '14 08:06 LordNed

What about a dialog box that states something along the lines of:

"The work directory you are attempting to open appears to be malformed. WindEditor will attempt to reconcile any issues it encounters during load but may still crash if you continue. Do you wish to continue?"

And then does any path magic required.

mtwilliams avatar Jul 02 '14 00:07 mtwilliams

Should I even be concerned that it crashes when they mess with an editor-generated folder structure?

LordNed avatar Jul 02 '14 02:07 LordNed

Perhaps, perhaps not. It's still a good idea to tell them that the data is malformed, even if just to shift the blame :smile:

mtwilliams avatar Jul 02 '14 06:07 mtwilliams