summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-09 10:02:07 +0200
committermadmaxoft <github@xoft.cz>2013-10-09 10:02:07 +0200
commitc03e44031168935d081c8986b433bac97d9fb8b8 (patch)
tree9a410270fe4d90c402d6057b3f11b27bd5744807 /MCServer/Plugins
parentMoved cMakeDir::MakeDir to cFile::CreateFolder. (diff)
downloadcuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar.gz
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar.bz2
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar.lz
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar.xz
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.tar.zst
cuberite-c03e44031168935d081c8986b433bac97d9fb8b8.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/main.lua16
1 files changed, 7 insertions, 9 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua
index aaeebecbb..92b0d150c 100644
--- a/MCServer/Plugins/APIDump/main.lua
+++ b/MCServer/Plugins/APIDump/main.lua
@@ -36,7 +36,6 @@ end
-
function DumpAPITxt()
LOG("Dumping all available functions to API.txt...");
function dump (prefix, a, Output)
@@ -177,18 +176,17 @@ function DumpAPIHtml()
-- Read in the descriptions:
ReadDescriptions(API);
+ -- Create the output folder
+ if not(cFile:IsFolder("API")) then
+ cFile:CreateFolder("API");
+ end
+
-- Create a "class index" file, write each class as a link to that file,
-- then dump class contents into class-specific file
local f = io.open("API/index.html", "w");
if (f == nil) then
- -- Create the output folder
- os.execute("mkdir API");
- local err;
- f, err = io.open("API/index.html", "w");
- if (f == nil) then
- LOGINFO("Cannot output HTML API: " .. err);
- return;
- end
+ LOGINFO("Cannot output HTML API: " .. err);
+ return;
end
f:write([[<html><head><title>MCServer API - class index</title>