src/Pure/General/file.scala
changeset 78298 3b0f8f1010f2
parent 78243 0e221a8128e4
child 78952 4e1dc465dfcc
--- a/src/Pure/General/file.scala	Mon Jul 10 22:44:28 2023 +0200
+++ b/src/Pure/General/file.scala	Tue Jul 11 11:37:23 2023 +0200
@@ -388,10 +388,9 @@
     else path.file.canExecute
   }
 
-  def set_executable(path: Path, flag: Boolean = false): Unit = {
-    if (Platform.is_windows && flag) Isabelle_System.chmod("a+x", path)
-    else if (Platform.is_windows) Isabelle_System.chmod("a-x", path)
-    else path.file.setExecutable(flag, false)
+  def set_executable(path: Path, reset: Boolean = false): Unit = {
+    if (Platform.is_windows) Isabelle_System.chmod(if (reset) "a-x" else "a+x", path)
+    else path.file.setExecutable(!reset, false)
   }