We did have a test to see if the temp folder existed. If it didn't we tried to create it. But it did exist. Given the purpose of the temp folder is to hold temporary data, we didn't bother with code to actually try to create a file, write to it, and then verify that it was written to. I mean, who would ever make a temporary folder read-only????
Anyway, once we figured it out, it was easy to fix.
I don't know why VFP (I can't remember which version we were using) didn't complain about the problem - it's been too long. But I do know that our error handler did not get called and the code happily continued executing even though the write was not actually performed. We used both On Error as well as Try Catch when it was finally added.
Fletcher
Fletcher Johnson FletcherSJohnson@Yahoo.com LinkedIn.com/in/FletcherJohnson twitter.com/fletcherJ strava.com/athletes/fletcherjohnson 408-946-0960 - work 408-781-2345 - cell
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Man-wai Chang Sent: Thursday, June 27, 2019 4:23 AM To: ProFox Email List Subject: Re: Odd Error Message
You better double-check the error handler! It should not have ignored the write error to that TEMP folder.
To verify whether a folder was writable, you could test write then delete a file in that folder and look for errors. You might need to temporarily use ON ERROR to trap file write errors before restoring the original error handler. I have done this kind of things many times.
But then, why would someone lock down temporary folders? They are supposed to be TEMPORARY! But then, if the limit was on folder size, your code might still failed. So, your program still had to be fixed to detect that. A virus scanner could also produce the same error.
Happy hunting anyway! :)
On Thu, Jun 27, 2019 at 1:05 AM Fletcher Johnson FletcherSJohnson@yahoo.com wrote:
folder....) Anyway, it turns out that the IT folk at the time had decided to lock down the Temp folder on all machines - but only by making it read only......
The worst part is that, while we couldn't write to the file, we could open it, etc. And when we tried to write to it, it acted like it did, even though it didn't.... But then crashed later when we used it again and the necessary values weren't there...