[Glade-devel] [patch, glade3] glade_util_path_is_writable



Hi Paolo!

On Tue, 2003-03-11 at 19:00, paolo borelli wrote:
I noticed that this function is marked with glade_implement_me()...

What about the attached patch? I'm probably missing something, since it
can't be so trivial ;)

You're right :-)

First, access is not portable enough.

Second, a function like glade_util_path_is_writable can't be useful,
because we can have a race condition if we suppose that the writability
of a file will not change between the glade_util_path_is_writable call
and the time when we really write.

I've thus removed the function, and removed its only use, which was
redundant anyway, as we were checking if we actually wrote anything.

The only need for this function will be to optimize the save stage,
cutting the processus at the very beginning if we detect that the file
is not writable, that it's not worth the effort, and it can be misused
too easily.

Thank you anyway for spotting the problem, and keep up the good work!

Cheers,






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]