Skip to content

Commit

Permalink
Main Menu: Allow copying directories from non-Minetest locations (#6095)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
octacian authored and nerzhul committed Jul 4, 2017
1 parent 7c24889 commit 66c4108
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/script/lua_api/l_mainmenu.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit 66c4108

Please sign in to comment.