shithub: mc

Download patch

ref: 06424fdd8ecf8082dac5c109421919d0a3ce169a
parent: 46bc8592a6cd4b2be507057f19bbb4e085e89bf2
author: Ori Bernstein <[email protected]>
date: Sun Dec 14 20:45:52 EST 2014

Put the if in the right place.

    mkpath() should work now.

--- a/libstd/mkpath.myr
+++ b/libstd/mkpath.myr
@@ -12,8 +12,9 @@
 	for i = 0; i < p.len; i++
 		if p[i] == '/' castto(byte) && i != 0
 			st = mkdir(p[:i], 0o777)
-		elif st != 0 && (st castto(errno)) != Eexist
-			-> false
+			if st != 0 && (st castto(errno)) != Eexist
+				-> false
+			;;
 		;;
 	;;