Wesley Hardman wrote:
Shouldn't creating a file or directory, simply inherit the permissions from the
parent? That is what I would expect (at least on Windows) when saving a file.
Why would there be a need to explicitly set the permissions?
On Windows, permissions are calculated when a file is created. The
actual calculation depends on various factors but the basic idea is that
they are inherited from the parent directory.
Unfortunately downloads are initially created in a temporary directory
until the save as dialog is completed, at which point they have to be
moved to the target directory. nsIFile has code to explicitly update the
permissions in this case. File Explorer in Windows Vista and later also
does this. Windows Explorer in Windows XP only does this if simple file
sharing is enabled.
--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform