aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-29 20:07:14 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-29 20:07:14 +0000
commit995bbe3f71c591296a42f2bbe79060d64af1a5f5 (patch)
tree9a50b961ac8db6b96ab45ddd3b06d85ce29eac1b /src
parentc0f91f5db94dc92326e22af5d2ae56c97a8c587e (diff)
downloadluarocks-995bbe3f71c591296a42f2bbe79060d64af1a5f5.tar.gz
luarocks-995bbe3f71c591296a42f2bbe79060d64af1a5f5.tar.bz2
luarocks-995bbe3f71c591296a42f2bbe79060d64af1a5f5.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/lua.lua8
1 files changed, 5 insertions, 3 deletions
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)
264 assert(lfs.attributes(src, "mode") == "directory") 264 assert(lfs.attributes(src, "mode") == "directory")
265 265
266 for file in lfs.dir(src) do 266 for file in lfs.dir(src) do
267 local ok = recursive_copy(dir.path(src, file), dest) 267 if file ~= "." and file ~= ".." then
268 if not ok then 268 local ok = recursive_copy(dir.path(src, file), dest)
269 return false, "Failed copying "..src.." to "..dest 269 if not ok then
270 return false, "Failed copying "..src.." to "..dest
271 end
270 end 272 end
271 end 273 end
272 return true 274 return true