From 2dfa1279eaed14c4d42d431fc62f3e8c881c2d38 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 12 Apr 2015 16:45:59 -0300 Subject: improved save path error messages for scene, textures and audio, fixes #1514 --- core/os/dir_access.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/os/dir_access.cpp') diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 53fe792c46..26a8090fe8 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -399,6 +399,15 @@ Error DirAccess::copy(String p_from,String p_to) { return err; } +bool DirAccess::exists(String p_dir) { + + DirAccess* da = DirAccess::create_for_path(p_dir); + bool valid = da->change_dir(p_dir)==OK; + memdelete(da); + return valid; + +} + DirAccess::DirAccess(){ _access_type=ACCESS_FILESYSTEM; -- cgit v1.2.3 From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- core/os/dir_access.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/os/dir_access.cpp') diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 26a8090fe8..a1031cf5f0 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 From 221443c5a2d174e52d391d15d5f1c6b5c9496d57 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 19 May 2015 21:36:35 -0300 Subject: more fixes -only refuse to load an older file if version major is different, fixes #1944 -fix drive letter default value, fixes #1939 --- core/os/dir_access.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/os/dir_access.cpp') diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index a1031cf5f0..d0baae5872 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -56,6 +56,17 @@ String DirAccess::_get_root_string() const { return ""; } +int DirAccess::get_current_drive() { + + String path = get_current_dir().to_lower(); + for(int i=0;i