aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Duffy <enduffy2014@outlook.com>2017-07-04 00:27:29 -0700
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-07-04 09:27:29 +0200
commit66c4108581902a34e2e42a4551c8c1157a881681 (patch)
tree93bf8e26edefc88e33a380de727f6957b2ea9c98
parent7c24889773173b1d863b078f8969e826263ff672 (diff)
downloadminetest-66c4108581902a34e2e42a4551c8c1157a881681.tar.gz
minetest-66c4108581902a34e2e42a4551c8c1157a881681.tar.bz2
minetest-66c4108581902a34e2e42a4551c8c1157a881681.zip
Main Menu: Allow copying directories from non-Minetest locations (#6095)
Allow `core.copy_dir` (main menu API) to copy directories from a non-Minetest location. The check to disallow copying to non-Minetest locations is retained.
-rw-r--r--src/script/lua_api/l_mainmenu.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 7c86525f6..917fea134 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -813,8 +813,7 @@ int ModApiMainMenu::l_copy_dir(lua_State *L)
std::string absolute_destination = fs::RemoveRelativePathComponents(destination);
std::string absolute_source = fs::RemoveRelativePathComponents(source);
- if ((ModApiMainMenu::isMinetestPath(absolute_source)) &&
- (ModApiMainMenu::isMinetestPath(absolute_destination))) {
+ if ((ModApiMainMenu::isMinetestPath(absolute_destination))) {
bool retval = fs::CopyDir(absolute_source,absolute_destination);
if (retval && (!keep_source)) {