diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-02-10 12:40:18 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-02-10 15:05:31 +0000 |
commit | b2cce68f7347ecde425f05ec4820a01611297920 (patch) | |
tree | 1ed26ce9a420c84bf2d0cabef539a5e94a06969c | |
parent | b3b4224839762d0fa0a34f991962b36349349439 (diff) | |
download | gitano-baserock/richardipsum/http.tar.gz |
Ca'n't close if we haven't a handlebaserock/richardipsum/http
-rw-r--r-- | lib/gitano/repository.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gitano/repository.lua b/lib/gitano/repository.lua index 5d4a194..4c5e652 100644 --- a/lib/gitano/repository.lua +++ b/lib/gitano/repository.lua @@ -183,8 +183,13 @@ function repo_method:check_local_git_files() end if anonexport then log.ddebug("<" .. self.name .. ">: Anonymous read allowed") - local fh = sio.open(self:fs_path() .. "/git-daemon-export-ok", "wc") - fh:close() + local fh, errmsg = sio.open(self:fs_path() .. "/git-daemon-export-ok", "wc") + + if fh then + fh:close() + else + log.warn("Ca'n't create git-daemon-export file:", errmsg) + end else log.ddebug("<" .. self.name .. ">: Anonymous read not allowed") luxio.unlink(self:fs_path() .. "/git-daemon-export-ok") |