Skip to content

Commit 66c4108

Browse files
octaciannerzhul
authored andcommittedJul 4, 2017
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.
1 parent 7c24889 commit 66c4108

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

Diff for: ‎src/script/lua_api/l_mainmenu.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,7 @@ int ModApiMainMenu::l_copy_dir(lua_State *L)
813813
std::string absolute_destination = fs::RemoveRelativePathComponents(destination);
814814
std::string absolute_source = fs::RemoveRelativePathComponents(source);
815815

816-
if ((ModApiMainMenu::isMinetestPath(absolute_source)) &&
817-
(ModApiMainMenu::isMinetestPath(absolute_destination))) {
816+
if ((ModApiMainMenu::isMinetestPath(absolute_destination))) {
818817
bool retval = fs::CopyDir(absolute_source,absolute_destination);
819818

820819
if (retval && (!keep_source)) {

0 commit comments

Comments
 (0)
Please sign in to comment.