From 995bbe3f71c591296a42f2bbe79060d64af1a5f5 Mon Sep 17 00:00:00 2001 From: hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> Date: Thu, 29 Oct 2009 20:07:14 +0000 Subject: Fix copy of rock contents. Bug reported by Fabio Mascarenhas. git-svn-id: http://luarocks.org/svn/luarocks/trunk@117 9ca3f7c1-7366-0410-b1a3-b5c78f85698c --- src/luarocks/fs/lua.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index af75f912..c6c16236 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua @@ -264,9 +264,11 @@ function copy_contents(src, dest) assert(lfs.attributes(src, "mode") == "directory") for file in lfs.dir(src) do - local ok = recursive_copy(dir.path(src, file), dest) - if not ok then - return false, "Failed copying "..src.." to "..dest + if file ~= "." and file ~= ".." then + local ok = recursive_copy(dir.path(src, file), dest) + if not ok then + return false, "Failed copying "..src.." to "..dest + end end end return true -- cgit v1.2.3-55-g6feb