demo_gui() fixed for some Linux (w/o copyfile) 58/21658/2
Samuel GOUGEON [Wed, 23 Dec 2020 18:58:46 +0000 (19:58 +0100)]
  http://mailinglists.scilab.org/Scilab-users-file-permission-and-demo-gui-tp4041207.html

Change-Id: Ic7736b379025e345a2947916937230286f688706

scilab/modules/demo_tools/macros/demo_gui.sci

index b0b3644..0e65bc7 100644 (file)
@@ -55,7 +55,7 @@ function demo_gui()
     File2 = TMPDIR + "/demo_gui_dockable.xml";
     if r=="checked" then
         if ~isfile(File2) then
-            r = copyfile(File, File2);
+            mputl(mgetl(File), File2); // copyfile() sometimes keeps the no-writable status
             doc = xmlRead(File2);
             xmlSetValues("/scilabgui/figure", ..
                          ["dockable" "on"