Browse Source

remove trailing slashes on FileSystem.exists (closes #2577)

Simon Krajewski 11 years ago
parent
commit
86e93b04ae
2 changed files with 2 additions and 2 deletions
  1. 1 1
      std/cpp/_std/sys/FileSystem.hx
  2. 1 1
      std/neko/_std/sys/FileSystem.hx

+ 1 - 1
std/cpp/_std/sys/FileSystem.hx

@@ -31,7 +31,7 @@ private enum FileKind {
 class FileSystem {
 class FileSystem {
 
 
 	public static inline function exists( path : String ) : Bool {
 	public static inline function exists( path : String ) : Bool {
-		return sys_exists(path);
+		return sys_exists(haxe.io.Path.removeTrailingSlashes(path));
 	}
 	}
 
 
 	public static function rename( path : String, newPath : String ) : Void {
 	public static function rename( path : String, newPath : String ) : Void {

+ 1 - 1
std/neko/_std/sys/FileSystem.hx

@@ -31,7 +31,7 @@ private enum FileKind {
 class FileSystem {
 class FileSystem {
 
 
 	public static function exists( path : String ) : Bool {
 	public static function exists( path : String ) : Bool {
-		return sys_exists(untyped path.__s);
+		return sys_exists(untyped (haxe.io.Path.removeTrailingSlashes(path)).__s);
 	}
 	}
 
 
 	public static function rename( path : String, newPath : String ) : Void {
 	public static function rename( path : String, newPath : String ) : Void {