diff options
author | Elijah Duffy <enduffy2014@outlook.com> | 2017-07-04 00:27:29 -0700 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-07-04 09:27:29 +0200 |
commit | 66c4108581902a34e2e42a4551c8c1157a881681 (patch) | |
tree | 93bf8e26edefc88e33a380de727f6957b2ea9c98 | |
parent | 7c24889773173b1d863b078f8969e826263ff672 (diff) | |
download | minetest-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.cpp | 3 |
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)) { |