浏览代码

Attempt to avoid breaking people's workflows on the change from 8ba0d513fa0068a241a25fbb6db09315fa3309cc

Juan Linietsky 6 年之前
父节点
当前提交
f2ae14f309
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/unix/dir_access_unix.cpp

+ 1 - 1
drivers/unix/dir_access_unix.cpp

@@ -329,7 +329,7 @@ Error DirAccessUnix::change_dir(String p_dir) {
 	}
 
 	String base = _get_root_path();
-	if (base != String()) {
+	if (base != String() && !try_dir.begins_with(base)) {
 		ERR_FAIL_COND_V(getcwd(real_current_dir_name, 2048) == NULL, ERR_BUG);
 		String new_dir;
 		new_dir.parse_utf8(real_current_dir_name);