shithub: mc

Download patch

ref: 3648de7668e10c8fb03a1d28c742d0ae66c96f07
parent: ab64fa7f418e370e2efa075c11630e33f1f6d231
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
+			;;
 		;;
 	;;