From a42c50b4ccc19c05ccf6dd1fa066677eea12ee6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 28 Sep 2016 16:39:47 +0200 Subject: [PATCH] Host/Posix: Fix os.copyfile with spaces in argument paths. --- src/host/os_copyfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/os_copyfile.c b/src/host/os_copyfile.c index 6d3a82e3..526afb5c 100644 --- a/src/host/os_copyfile.c +++ b/src/host/os_copyfile.c @@ -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