From 675c35708b0c4657a98341d78ba7d9f06323d35d Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 20 Dec 2013 16:14:49 +0000 Subject: Possibly fixes #384 @madmaxoft, is this the right syntax for lua for loops? --- MCServer/Plugins/APIDump/main_APIDump.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua') diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index ec5569f55..676f4d9a6 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -231,6 +231,12 @@ end function DumpAPIHtml() + LOG("Moving static files."); + + for i in cFile:GetFolderContents("Static") do + cFile:Copy("Static/" .. i, "API/" .. i); + end + LOG("Dumping all available functions and constants to API subfolder..."); LOG("Creating API tables..."); -- cgit v1.2.3 From 837bbf0de369a560ed0701e3f63e002a7171a8f8 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 20 Dec 2013 16:31:30 +0000 Subject: @madmaxoft now? --- MCServer/Plugins/APIDump/main_APIDump.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua') diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index 676f4d9a6..d7aff1926 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -1,4 +1,3 @@ - -- main.lua -- Implements the plugin entrypoint (in this case the entire plugin) @@ -233,8 +232,9 @@ end function DumpAPIHtml() LOG("Moving static files."); - for i in cFile:GetFolderContents("Static") do - cFile:Copy("Static/" .. i, "API/" .. i); + local localFolder = g_Plugin:GetLocalFolder(); + for k, v in cFile:GetFolderContents("Static") do + cFile:Copy(localFolder .. "/Static/" .. v, localFolder .. "/API/" .. v); end LOG("Dumping all available functions and constants to API subfolder..."); -- cgit v1.2.3 From d31fd1528b909e40022e4fbe27fe98d74b30e34e Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 20 Dec 2013 16:38:10 +0000 Subject: fix the issues xoft pointed out --- MCServer/Plugins/APIDump/main_APIDump.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua') diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index d7aff1926..7df1367d1 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -230,14 +230,13 @@ end function DumpAPIHtml() - LOG("Moving static files."); + LOG("Dumping all available functions and constants to API subfolder..."); - local localFolder = g_Plugin:GetLocalFolder(); + LOG("Moving static files.."); + local localFolder = ipairs(g_Plugin:GetLocalFolder()); for k, v in cFile:GetFolderContents("Static") do - cFile:Copy(localFolder .. "/Static/" .. v, localFolder .. "/API/" .. v); + cFile:Copy(localFolder .. "/Static/" .. v, "API/" .. v); end - - LOG("Dumping all available functions and constants to API subfolder..."); LOG("Creating API tables..."); local API, Globals = CreateAPITables(); -- cgit v1.2.3 From ba5e42de4084e92315de0b7522a5b913064f806d Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 20 Dec 2013 17:12:39 +0000 Subject: done... finally --- MCServer/Plugins/APIDump/main_APIDump.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins/APIDump/main_APIDump.lua') diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua index 7df1367d1..404e0a519 100644 --- a/MCServer/Plugins/APIDump/main_APIDump.lua +++ b/MCServer/Plugins/APIDump/main_APIDump.lua @@ -233,8 +233,8 @@ function DumpAPIHtml() LOG("Dumping all available functions and constants to API subfolder..."); LOG("Moving static files.."); - local localFolder = ipairs(g_Plugin:GetLocalFolder()); - for k, v in cFile:GetFolderContents("Static") do + local localFolder = g_Plugin:GetLocalFolder(); + for k, v in cFile:GetFolderContents(localFolder .. "/Static") do cFile:Copy(localFolder .. "/Static/" .. v, "API/" .. v); end -- cgit v1.2.3