Merge pull request #587 from DPSLynix/patch-1

Host/Posix: Fix os.copyfile with spaces in argument paths.
This commit is contained in:
Tom van Dijck 2016-09-28 08:53:40 -07:00 committed by GitHub
commit 87d0a59b85

View File

@ -16,7 +16,7 @@ int os_copyfile(lua_State* L)
#if PLATFORM_WINDOWS
z = CopyFileA(src, dst, FALSE);
#else
lua_pushfstring(L, "cp %s %s", src, dst);
lua_pushfstring(L, "cp \"%s\" \"%s\"", src, dst);
z = (system(lua_tostring(L, -1)) == 0);
#endif