Browse Source

fixed compilation failure if output dir starts with a slash (fixes #6844)

Alexander Kuzmenko 7 years ago
parent
commit
dd17267f96
2 changed files with 8 additions and 2 deletions
  1. 7 1
      extra/CHANGES.txt
  2. 1 1
      src/context/common.ml

+ 7 - 1
extra/CHANGES.txt

@@ -1,8 +1,14 @@
+2018-XX-XX: 3.4.7
+
+	Bugfixes:
+
+	all : fixed a compilation failure if output directory starts with a slash (#6844)
+
 2018-02-12: 3.4.6
 
 	Bugfixes:
 
-	all : fixed a bug when Haxe compiler couldn't find std lib on Linux if executed by another  program
+	all : fixed a bug when Haxe compiler couldn't find std lib on Linux if executed by another program
 	all : fixed "Unix.Unix_error" compiler failure if output directory contains a trailing slash (#6212, #6768)
 	php7 : fixed an issue with "Object" used as a class name for PHP 7.2 (it's a new keyword in php) (#6838)
 	as3 : fixed "inifinite recursion" compiler error for classes named "Object"

+ 1 - 1
src/context/common.ml

@@ -1036,7 +1036,7 @@ let rec mkdir_recursive base dir_list =
 		in
 		let path_len = String.length path in
 		let path =
-			if path_len > 0 && path.[path_len - 1] = '/' || path.[path_len - 1] == '\\' then
+			if path_len > 0 && (path.[path_len - 1] = '/' || path.[path_len - 1] == '\\') then
 				String.sub path 0 (path_len - 1)
 			else
 				path