Simplified file permission handling
Issue #175
resolved
Originally reported on Google Code with ID 175
File permissions are only used in the database list at the moment, and are probed using
a combination of is_readable, is_writable, integers and strings.
Why are we not using fileperms() ?
Relative patch attached.
(beware: my eyes have landed on the database listing code and strange ideas of modularization
and caching are coming)
Reported by dreadnaut
on 2013-02-11 15:18:22
<hr> * Attachment: fileperms-r333.diff
Comments (5)
-
-
reporter I thought about the safety of fileperms(), but I couldn't think of a common OS or filesystem where stat() does not return standard read-write permissions. And it doesn't seem something we should "future-proof" against, either. At the same times, I like the two separate fields, because they abstract from low level stuff like "& 0400" —but then again, do we need to abstract? In the end, anything would be more usable than checking for r/w characters in a string :)
Reported by
dreadnaut
on 2013-02-12 19:33:28 -
This issue was closed by revision r336.
Reported by
crazy4chrissi
on 2013-02-15 14:19:10 - Status changed:Fixed
-
I just committed my fix to svn. Although I'd agree fileperms() is okay to use and the additional abstraction is not necessary, I consider this solution a bit better. I hope this fixes your issue as you expected. If not, feel free to reopen it.
Reported by
crazy4chrissi
on 2013-02-15 14:20:25 -
reporter Fine for me!
Reported by
dreadnaut
on 2013-02-15 22:53:31 - Log in to comment
Reported by
crazy4chrissi
on 2013-02-12 18:30:16 - Status changed:Accepted
<hr> * Attachment: fileperms-crazy4chrissi-r335.diff