src/Pure/General/file.scala
changeset 69789 2c3e5e58d93f
parent 69788 c175499a7537
child 71114 6cfec8029831
--- a/src/Pure/General/file.scala	Mon Feb 04 15:45:40 2019 +0100
+++ b/src/Pure/General/file.scala	Mon Feb 04 16:01:44 2019 +0100
@@ -349,9 +349,10 @@
     else path.file.canExecute
   }
 
-  def executable(path: Path)
+  def set_executable(path: Path, flag: Boolean)
   {
-    if (Platform.is_windows) Isabelle_System.bash("chmod a+x " + bash_path(path)).check
-    else path.file.setExecutable(true, false)
+    if (Platform.is_windows && flag) Isabelle_System.bash("chmod a+x " + bash_path(path)).check
+    else if (Platform.is_windows) Isabelle_System.bash("chmod a-x " + bash_path(path)).check
+    else path.file.setExecutable(flag, false)
   }
 }