diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 4 | ||||
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 28 | ||||
-rw-r--r-- | drivers/unix/os_unix.cpp | 10 | ||||
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 12 |
4 files changed, 27 insertions, 27 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 21ccef3518..033f10dbc5 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -472,7 +472,7 @@ String ShaderGLES3::_version_get_sha1(Version *p_version) const { bool ShaderGLES3::_load_from_cache(Version *p_version) { #if 0 String sha1 = _version_get_sha1(p_version); - String path = shader_cache_dir.plus_file(name).plus_file(base_sha256).plus_file(sha1) + ".cache"; + String path = shader_cache_dir.path_join(name).path_join(base_sha256).path_join(sha1) + ".cache"; Ref<FileAccess> f = FileAccess::open(path, FileAccess::READ); if (f.is_null()) { @@ -538,7 +538,7 @@ bool ShaderGLES3::_load_from_cache(Version *p_version) { void ShaderGLES3::_save_to_cache(Version *p_version) { #if 0 String sha1 = _version_get_sha1(p_version); - String path = shader_cache_dir.plus_file(name).plus_file(base_sha256).plus_file(sha1) + ".cache"; + String path = shader_cache_dir.path_join(name).path_join(base_sha256).path_join(sha1) + ".cache"; Ref<FileAccess> f = FileAccess::open(path, FileAccess::WRITE); ERR_FAIL_COND(f.is_null()); diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index b8b72b8d30..55ea952696 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -69,7 +69,7 @@ bool DirAccessUnix::file_exists(String p_file) { GLOBAL_LOCK_FUNCTION if (p_file.is_relative_path()) { - p_file = current_dir.plus_file(p_file); + p_file = current_dir.path_join(p_file); } p_file = fix_path(p_file); @@ -88,7 +88,7 @@ bool DirAccessUnix::dir_exists(String p_dir) { GLOBAL_LOCK_FUNCTION if (p_dir.is_relative_path()) { - p_dir = get_current_dir().plus_file(p_dir); + p_dir = get_current_dir().path_join(p_dir); } p_dir = fix_path(p_dir); @@ -103,7 +103,7 @@ bool DirAccessUnix::is_readable(String p_dir) { GLOBAL_LOCK_FUNCTION if (p_dir.is_relative_path()) { - p_dir = get_current_dir().plus_file(p_dir); + p_dir = get_current_dir().path_join(p_dir); } p_dir = fix_path(p_dir); @@ -114,7 +114,7 @@ bool DirAccessUnix::is_writable(String p_dir) { GLOBAL_LOCK_FUNCTION if (p_dir.is_relative_path()) { - p_dir = get_current_dir().plus_file(p_dir); + p_dir = get_current_dir().path_join(p_dir); } p_dir = fix_path(p_dir); @@ -123,7 +123,7 @@ bool DirAccessUnix::is_writable(String p_dir) { uint64_t DirAccessUnix::get_modified_time(String p_file) { if (p_file.is_relative_path()) { - p_file = current_dir.plus_file(p_file); + p_file = current_dir.path_join(p_file); } p_file = fix_path(p_file); @@ -159,7 +159,7 @@ String DirAccessUnix::get_next() { // known if it points to a directory. stat() will resolve the link // for us. if (entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK) { - String f = current_dir.plus_file(fname); + String f = current_dir.path_join(fname); struct stat flags; if (stat(f.utf8().get_data(), &flags) == 0) { @@ -315,7 +315,7 @@ Error DirAccessUnix::make_dir(String p_dir) { GLOBAL_LOCK_FUNCTION if (p_dir.is_relative_path()) { - p_dir = get_current_dir().plus_file(p_dir); + p_dir = get_current_dir().path_join(p_dir); } p_dir = fix_path(p_dir); @@ -350,7 +350,7 @@ Error DirAccessUnix::change_dir(String p_dir) { // try_dir is the directory we are trying to change into String try_dir = ""; if (p_dir.is_relative_path()) { - String next_dir = current_dir.plus_file(p_dir); + String next_dir = current_dir.path_join(p_dir); next_dir = next_dir.simplify_path(); try_dir = next_dir; } else { @@ -394,13 +394,13 @@ String DirAccessUnix::get_current_dir(bool p_include_drive) const { Error DirAccessUnix::rename(String p_path, String p_new_path) { if (p_path.is_relative_path()) { - p_path = get_current_dir().plus_file(p_path); + p_path = get_current_dir().path_join(p_path); } p_path = fix_path(p_path); if (p_new_path.is_relative_path()) { - p_new_path = get_current_dir().plus_file(p_new_path); + p_new_path = get_current_dir().path_join(p_new_path); } p_new_path = fix_path(p_new_path); @@ -410,7 +410,7 @@ Error DirAccessUnix::rename(String p_path, String p_new_path) { Error DirAccessUnix::remove(String p_path) { if (p_path.is_relative_path()) { - p_path = get_current_dir().plus_file(p_path); + p_path = get_current_dir().path_join(p_path); } p_path = fix_path(p_path); @@ -429,7 +429,7 @@ Error DirAccessUnix::remove(String p_path) { bool DirAccessUnix::is_link(String p_file) { if (p_file.is_relative_path()) { - p_file = get_current_dir().plus_file(p_file); + p_file = get_current_dir().path_join(p_file); } p_file = fix_path(p_file); @@ -444,7 +444,7 @@ bool DirAccessUnix::is_link(String p_file) { String DirAccessUnix::read_link(String p_file) { if (p_file.is_relative_path()) { - p_file = get_current_dir().plus_file(p_file); + p_file = get_current_dir().path_join(p_file); } p_file = fix_path(p_file); @@ -461,7 +461,7 @@ String DirAccessUnix::read_link(String p_file) { Error DirAccessUnix::create_link(String p_source, String p_target) { if (p_target.is_relative_path()) { - p_target = get_current_dir().plus_file(p_target); + p_target = get_current_dir().path_join(p_target); } p_source = fix_path(p_source); diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 0fbd9f7b8f..384f46c8df 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -454,12 +454,12 @@ Error OS_Unix::open_dynamic_library(const String p_path, void *&p_library_handle if (!FileAccess::exists(path)) { // This code exists so GDExtension can load .so files from within the executable path. - path = get_executable_path().get_base_dir().plus_file(p_path.get_file()); + path = get_executable_path().get_base_dir().path_join(p_path.get_file()); } if (!FileAccess::exists(path)) { // This code exists so GDExtension can load .so files from a standard unix location. - path = get_executable_path().get_base_dir().plus_file("../lib").plus_file(p_path.get_file()); + path = get_executable_path().get_base_dir().path_join("../lib").path_join(p_path.get_file()); } p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); @@ -526,13 +526,13 @@ String OS_Unix::get_user_data_dir() const { if (custom_dir.is_empty()) { custom_dir = appname; } - return get_data_path().plus_file(custom_dir); + return get_data_path().path_join(custom_dir); } else { - return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file(appname); + return get_data_path().path_join(get_godot_dir_name()).path_join("app_userdata").path_join(appname); } } - return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file("[unnamed project]"); + return get_data_path().path_join(get_godot_dir_name()).path_join("app_userdata").path_join("[unnamed project]"); } String OS_Unix::get_executable_path() const { diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 2125709b32..11fd29c8f5 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -157,7 +157,7 @@ Error DirAccessWindows::make_dir(String p_dir) { p_dir = fix_path(p_dir); if (p_dir.is_relative_path()) { - p_dir = current_dir.plus_file(p_dir); + p_dir = current_dir.path_join(p_dir); } p_dir = p_dir.replace("/", "\\"); @@ -213,7 +213,7 @@ bool DirAccessWindows::file_exists(String p_file) { GLOBAL_LOCK_FUNCTION if (!p_file.is_absolute_path()) { - p_file = get_current_dir().plus_file(p_file); + p_file = get_current_dir().path_join(p_file); } p_file = fix_path(p_file); @@ -232,7 +232,7 @@ bool DirAccessWindows::dir_exists(String p_dir) { GLOBAL_LOCK_FUNCTION if (p_dir.is_relative_path()) { - p_dir = get_current_dir().plus_file(p_dir); + p_dir = get_current_dir().path_join(p_dir); } p_dir = fix_path(p_dir); @@ -247,13 +247,13 @@ bool DirAccessWindows::dir_exists(String p_dir) { Error DirAccessWindows::rename(String p_path, String p_new_path) { if (p_path.is_relative_path()) { - p_path = get_current_dir().plus_file(p_path); + p_path = get_current_dir().path_join(p_path); } p_path = fix_path(p_path); if (p_new_path.is_relative_path()) { - p_new_path = get_current_dir().plus_file(p_new_path); + p_new_path = get_current_dir().path_join(p_new_path); } p_new_path = fix_path(p_new_path); @@ -291,7 +291,7 @@ Error DirAccessWindows::rename(String p_path, String p_new_path) { Error DirAccessWindows::remove(String p_path) { if (p_path.is_relative_path()) { - p_path = get_current_dir().plus_file(p_path); + p_path = get_current_dir().path_join(p_path); } p_path = fix_path(p_path); |