[Scilab-users] file permission and demo_gui()
Samuel Gougeon
sgougeon at free.fr
Wed Dec 23 19:00:18 CET 2020
Le 23/12/2020 à 18:40, Jean-Yves Baudais a écrit :
>> I will try to test by forcing File permissions on my system, and see
>> what copyfile() does.
>
> I tested for different combinaison of permissions ('w', 'r', 'x'): copyfile() keeps them unchanged. (Permissions are kept for 'user' only, I guess permission mask or something like that for 'group' and 'other'.)
copyfile has no option to force permissions of the copy.
You might do and test the following:
1. replace the copyfile instruction with a mgetl + mputl combination:
// r = copyfile(File, File2);
r = mgetl(File);
mputl(r, File2);
2. exec demo_gui.sci to update it
3. Remove demo_gui_dockable.xml in TMPDIR, or just exit and run a new
session (so with a new TMPDIR)
4. run demo_gui(), and play with its dockable preferences.
If it works, i will push a patch for Scilab 6.1.1. Anyway the copyfile
issue would have to be addressed. Since copyfile() is used 18 times
within Scilab, other issues elsewhere could be expected. At least, the
fact that permissions are kept should be documented in the copyfile help
page.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20201223/ba08cadd/attachment.htm>
More information about the users
mailing list