summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/main_APIDump.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-09-27 00:10:50 +0200
committerMattes D <github@xoft.cz>2015-09-27 00:10:50 +0200
commit0e3bb7a3982df1f94d9946b091996841eaa90286 (patch)
tree0cbe86c533f1d5caea5fa00b32a2a395590dbf59 /Server/Plugins/APIDump/main_APIDump.lua
parentMerge pull request #2496 from SafwatHalaby/compileCommitId (diff)
parentExtended and fixed the cFile API. (diff)
downloadcuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar.gz
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar.bz2
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar.lz
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar.xz
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.tar.zst
cuberite-0e3bb7a3982df1f94d9946b091996841eaa90286.zip
Diffstat (limited to 'Server/Plugins/APIDump/main_APIDump.lua')
-rw-r--r--Server/Plugins/APIDump/main_APIDump.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/Server/Plugins/APIDump/main_APIDump.lua b/Server/Plugins/APIDump/main_APIDump.lua
index c0685087a..fd2b0e786 100644
--- a/Server/Plugins/APIDump/main_APIDump.lua
+++ b/Server/Plugins/APIDump/main_APIDump.lua
@@ -174,11 +174,9 @@ local function WriteArticles(f)
]]);
for _, extra in ipairs(g_APIDesc.ExtraPages) do
local SrcFileName = g_PluginFolder .. "/" .. extra.FileName;
- if (cFile:Exists(SrcFileName)) then
+ if (cFile:IsFile(SrcFileName)) then
local DstFileName = "API/" .. extra.FileName;
- if (cFile:Exists(DstFileName)) then
- cFile:Delete(DstFileName);
- end
+ cFile:Delete(DstFileName);
cFile:Copy(SrcFileName, DstFileName);
f:write("<li><a href=\"" .. extra.FileName .. "\">" .. extra.Title .. "</a></li>\n");
else
@@ -1112,7 +1110,7 @@ local function ListMissingPages()
local NumLinks = 0;
for PageName, Referrers in pairs(g_TrackedPages) do
NumLinks = NumLinks + 1;
- if not(cFile:Exists("API/" .. PageName .. ".html")) then
+ if not(cFile:IsFile("API/" .. PageName .. ".html")) then
table.insert(MissingPages, {Name = PageName, Refs = Referrers} );
end
end;