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
[email protected]
LinkedIn.com/in/FletcherJohnson
twitter.com/fletcherJ
strava.com/athletes/fletcherjohnson
408-946-0960 - work
408-781-2345 - cell


-----Original Message-----
From: ProFox [mailto:[email protected]] 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
<[email protected]> 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...

-- 
 .~. Might, Courage, Vision. SINCERITY!
/ v \ 64-bit Fedora 25 Server Spin
/( _ )\ http://sites.google.com/site/changmw
^ ^ May the Force and farces be with you!

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to