by HotWax » Sat Oct 03, 2009 11:44 pm
Project Dark Fox wrote:Windows Explorer. I open the ZIP and double-click the WAD file from within the ZIP file. ZDoom opens it without any qualms.
...a little warning would certainly be nice. Somehow. I dunno.
This is a case of the OS being "too" helpful, methinks. And it's damned-if-you-do-damned-if-you-don't as far as how they could have coded it to "fix" such "mistakes".
As you can tell by my unabashed overuse of quotations, I don't think Windows or ZDoom is doing anything wrong here.
For convenience, Explorer displays the ZIP file like any other folder, without bothering you with the messy details like how it's actually only reading the contents and then extracting the files to a temporary folder on demand. Since the file you ran had ZDoom associated with it, it then ran ZDoom passing the temporary file in as an argument. And as is standard practice when running arbitrary files through the executable associated with them, it uses the current (temporary) folder as the working directory. ZDoom is coded to put saves in the working directory by default. Put all that in a nice big kettle and stir well, and you have your current conundrum.
There's a deeper problem here, though. What if the file you ran relied on other files within the ZIP? For example, if it was a batch file that ran ZDoom with two WADs and a DEH patch included in the ZIP, it wouldn't get very far. You really should just extract the contents of the ZIP and then run it from its permanent resting place on your hard drive. What you're doing is like trying to run a game directly off the CD without bothering to install it first. Chaos will naturally ensue.
[quote="Project Dark Fox"]Windows Explorer. I open the ZIP and double-click the WAD file from within the ZIP file. ZDoom opens it without any qualms.[/quote]
[quote]...a little warning would certainly be nice. Somehow. I dunno.[/quote]
This is a case of the OS being "too" helpful, methinks. And it's damned-if-you-do-damned-if-you-don't as far as how they could have coded it to "fix" such "mistakes".
As you can tell by my unabashed overuse of quotations, I don't think Windows or ZDoom is doing anything wrong here.
For convenience, Explorer displays the ZIP file like any other folder, without bothering you with the messy details like how it's actually only reading the contents and then extracting the files to a temporary folder on demand. Since the file you ran had ZDoom associated with it, it then ran ZDoom passing the temporary file in as an argument. And as is standard practice when running arbitrary files through the executable associated with them, it uses the current (temporary) folder as the working directory. ZDoom is coded to put saves in the working directory by default. Put all that in a nice big kettle and stir well, and you have your current conundrum.
There's a deeper problem here, though. What if the file you ran relied on other files within the ZIP? For example, if it was a batch file that ran ZDoom with two WADs and a DEH patch included in the ZIP, it wouldn't get very far. You really should just extract the contents of the ZIP and then run it from its permanent resting place on your hard drive. What you're doing is like trying to run a game directly off the CD without bothering to install it first. Chaos will naturally ensue.