summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2013-05-23 21:27:33 +0100
committerRichard Maw <richard.maw@gmail.com>2013-05-23 21:35:22 +0100
commitae904f76a8ffbb89dce7c9d68de7c3ba1e5fb256 (patch)
tree399796a07f6c54a91f5b2488964b82e9781a7b95
parent409015f2cd025fc2f9769f79eebf3d7e628e086b (diff)
downloadgitano-ae904f76a8ffbb89dce7c9d68de7c3ba1e5fb256.tar.bz2
repository: use path_join in some places
It's longer in these cases, but it's more explicitly creating a path when using a function for it.
-rw-r--r--lib/gitano/repository.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitano/repository.lua b/lib/gitano/repository.lua
index f512092..e6f4fee 100644
--- a/lib/gitano/repository.lua
+++ b/lib/gitano/repository.lua
@@ -730,8 +730,8 @@ local function foreach_repository(conf, callback, filterfn)
if e == 0 then
if i.d_name:find("%.git$") then
-- Might be a repo, save for later
- all_repos[#all_repos+1] = (prefix .. "/" ..
- i.d_name):gsub("^/", "")
+ all_repos[#all_repos+1] = (util.path_join(prefix, i.d_name)
+ ):gsub("^/", "")
else
if i.d_name:find("^[^%.]") then
recurse[#recurse+1] = i.d_name
@@ -742,8 +742,8 @@ local function foreach_repository(conf, callback, filterfn)
dirp = nil -- Allow GC of DIR handle
-- Now try and recurse if possible,
for i = 1, #recurse do
- local ok, msg = scan_dir(dirname .. "/" .. recurse[i],
- prefix .. "/" .. recurse[i])
+ local ok, msg = scan_dir(util.path_join(dirname, recurse[i]),
+ util.path_join(prefix, recurse[i]))
if not ok then
return ok, msg
end