summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/main_APIDump.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-09-26 22:54:18 +0200
committerMattes D <github@xoft.cz>2015-09-26 22:54:18 +0200
commitad57ce5f9940ab2776d9a3ad6dafe86b07d23058 (patch)
tree0cbe86c533f1d5caea5fa00b32a2a395590dbf59 /Server/Plugins/APIDump/main_APIDump.lua
parentMerge pull request #2496 from SafwatHalaby/compileCommitId (diff)
downloadcuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar.gz
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar.bz2
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar.lz
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar.xz
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.tar.zst
cuberite-ad57ce5f9940ab2776d9a3ad6dafe86b07d23058.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;