src/Pure/System/isabelle_system.ML
changeset 60028 9a06e10f1a5c
parent 60013 42d34eeb283c
child 60263 2a5dbad75355
--- a/src/Pure/System/isabelle_system.ML	Sun Apr 12 11:23:36 2015 +0200
+++ b/src/Pure/System/isabelle_system.ML	Sun Apr 12 11:38:05 2015 +0200
@@ -59,9 +59,8 @@
 (* directory operations *)
 
 fun mkdirs path =
-  if #rc (Bash.process ("mkdir -p " ^ File.shell_path path)) <> 0 then
-    error ("Failed to create directory: " ^ Path.print path)
-  else ();
+  if File.is_dir path orelse #rc (Bash.process ("mkdir -p " ^ File.shell_path path)) = 0 then ()
+  else error ("Failed to create directory: " ^ Path.print path);
 
 fun mkdir path =
   if File.is_dir path then () else OS.FileSys.mkDir (File.platform_path path);