From 50f3a2d58d3e337facdf8e79430baa7a892a3ace Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Sun, 15 Jan 2017 00:45:47 +0300 Subject: [PATCH] aefae --- .DS_Store | Bin 18436 -> 18436 bytes Applications.txt | 4 ++-- Applications/.DS_Store | Bin 79876 -> 79876 bytes Applications/MineCodeIDE/MineCodeIDE.lua | 3 ++- lib/ECSAPI.lua | 6 ++---- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.DS_Store b/.DS_Store index 9c8056034ce3516114cff94e0c10f98c4c239836..3329d6b2042c397121101b76bf6a57d4402ea803 100644 GIT binary patch delta 52 wcmZpfz}PZ@al;BRb^~J_1w%8V&FjTXxnZ2i>%}}a8!LSkhY4)fx4Oy;0FyKh@Bjb+ delta 52 wcmZpfz}PZ@al;BRc2grA1tSZS&FjTXxnZ2i>%}}a8!LSkhY4)fx4Oy;0F~4a3jhEB diff --git a/Applications.txt b/Applications.txt index 02e07dcb..119c2e94 100644 --- a/Applications.txt +++ b/Applications.txt @@ -274,7 +274,7 @@ url="IgorTimofeev/OpenComputers/master/lib/ECSAPI.lua", type="Library", preLoadFile=true, - version=1.09, + version=1.10, }, { name="lib/colorlib.lua", @@ -886,7 +886,7 @@ icon="IgorTimofeev/OpenComputers/master/Applications/MineCodeIDE/Icon.pic", createShortcut="dock", forceDownload=true, - version=1.12, + version=1.13, }, { name="MineOS/Applications/Battleship", diff --git a/Applications/.DS_Store b/Applications/.DS_Store index 744927d6b0a6bb5221992153b314377f18f662d2..f9f576ebdde9326432576e1ead153b1ed8c7d7a2 100644 GIT binary patch delta 26 icmZqqz|!)8Wy8|#>;}d<3WjDzlOH;GZ2q!cpaB4v#0xe6 delta 18 acmZqqz|!)8Wy8|#lW#frZ~n4fpaB40zzOF7 diff --git a/Applications/MineCodeIDE/MineCodeIDE.lua b/Applications/MineCodeIDE/MineCodeIDE.lua index 0c566977..cbd07ae8 100755 --- a/Applications/MineCodeIDE/MineCodeIDE.lua +++ b/Applications/MineCodeIDE/MineCodeIDE.lua @@ -204,7 +204,8 @@ end ---------------------------------------------------- File processing methods ---------------------------------------------------- local function removeTabs(text) - return text:gsub("\t", string.rep(" ", mainWindow.codeView.indentationWidth)) + local result = text:gsub("\t", string.rep(" ", mainWindow.codeView.indentationWidth)) + return result end local function loadFile(path) diff --git a/lib/ECSAPI.lua b/lib/ECSAPI.lua index d2d88568..f47f6fda 100755 --- a/lib/ECSAPI.lua +++ b/lib/ECSAPI.lua @@ -1178,10 +1178,8 @@ function ecs.newFile(path) local inputs = ecs.universalWindow("auto", "auto", 30, ecs.windowColors.background, true, {"EmptyLine"}, {"CenterText", 0x262626, "Новый файл"}, {"EmptyLine"}, {"Input", 0x262626, 0x880000, ""}, {"EmptyLine"}, {"Button", {0xbbbbbb, 0xffffff, "OK"}}) if ecs.checkName(inputs[1], path) then - fs.makeDirectory(fs.path(path)) - local file = io.open(path, "w") - file:write("") - file:close() + fs.makeDirectory(path) + local file = io.open(path .. inputs[1], "w"); file:write(""); file:close() local MineOSCore = require("MineOSCore") MineOSCore.safeLaunch(MineOSCore.paths.applications .. "/MineCode IDE.app/MineCode IDE.lua", "open", path) end