Host/Posix: Fix os.copyfile with spaces in argument paths.

This commit is contained in:
Jérôme Leclercq 2016-09-28 16:39:47 +02:00 committed by GitHub
parent f85225e329
commit a42c50b4cc

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