the detailed folders returning incorrect data

Mark Waddingham mark at livecode.com
Fri Jul 1 07:49:59 EDT 2016


On 2016-06-30 23:13, Paul Dupuis wrote:
> It would be so much nicer to actually check permissions that tricks 
> like
> writing dummy files and checking for errors

I think it is important to clarify what you are wanting to achieve here.

There are two things to remember when dealing with files and folders:

   1) You have to check for success of all your file operations - they 
can fail for all kinds of reasons which are entirely outwith your 
control, not just permissions issues.

   2) There is a time-of-check to time-of-use problem with things related 
to unopened files / folders: just because permissions look okay before 
you start an operation, doesn't mean they will be okay by the time you 
start the operation, or will remain so throughout the operation.

ACLs on Windows (as already has been mentioned) are very fine-grained 
(and quite complex) - I suspect they should be thought of more as 
'failsafes which get triggered whenever you do something you are not 
allowed to do' rather than 'things to be queried to see if you can do 
something'.

I just wonder if there is a better away to approach the problem you are 
trying to solve; or whether there is actually a problem to solve at all 
(which isn't already solved by thorough error checking and handling).

Warmest Regards,

Mark.

P.S. I'm not saying that being able to query the Window's ACLs would not 
potentially be useful - just that even with that ability you might find 
that it only works in a subset of cases...

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list