aefaefaef

This commit is contained in:
Igor Timofeev 2017-01-09 23:51:01 +03:00
parent 953e255be4
commit cb88e96033
4 changed files with 14 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -8,7 +8,7 @@
about="IgorTimofeev/OpenComputers/master/MineOS/About/", about="IgorTimofeev/OpenComputers/master/MineOS/About/",
type="Script", type="Script",
forceDownload=true, forceDownload=true,
version=3.40, version=3.41,
}, },
{ {
name="MineOS/Pictures/Raspberry.pic", name="MineOS/Pictures/Raspberry.pic",
@ -253,7 +253,7 @@
name="lib/MineOSCore.lua", name="lib/MineOSCore.lua",
url="IgorTimofeev/OpenComputers/master/lib/MineOSCore.lua", url="IgorTimofeev/OpenComputers/master/lib/MineOSCore.lua",
type="Library", type="Library",
version=1.35, version=1.36,
}, },
{ {
name="lib/advancedLua.lua", name="lib/advancedLua.lua",

View File

@ -387,6 +387,7 @@ local function updateDock()
for file in fs.list(MineOSCore.paths.trash) do for file in fs.list(MineOSCore.paths.trash) do
fs.remove(MineOSCore.paths.trash .. file) fs.remove(MineOSCore.paths.trash .. file)
end end
workspace.updateFileList()
end end
end end
menu:show() menu:show()

View File

@ -743,7 +743,17 @@ function MineOSCore.iconRightClick(icon, eventData)
_G.clipboardCut = true _G.clipboardCut = true
computer.pushSignal("MineOSCore", "updateFileList") computer.pushSignal("MineOSCore", "updateFileList")
elseif action == MineOSCore.localization.contextMenuDelete then elseif action == MineOSCore.localization.contextMenuDelete then
fs.rename(icon.path, MineOSCore.paths.trash .. fs.name(icon.path)) if fs.path(icon.path) == MineOSCore.paths.trash then
fs.remove(icon.path)
else
local newName = MineOSCore.paths.trash .. fs.name(icon.path)
local clearName = MineOSCore.hideFileFormat(fs.name(icon.path))
local repeats = 1
while fs.exists(newName) do
newName, repeats = MineOSCore.paths.trash .. clearName .. string.rep("-copy", repeats) .. icon.format, repeats + 1
end
fs.rename(icon.path, newName)
end
computer.pushSignal("MineOSCore", "updateFileList") computer.pushSignal("MineOSCore", "updateFileList")
elseif action == MineOSCore.localization.contextMenuRename then elseif action == MineOSCore.localization.contextMenuRename then
ecs.rename(icon.path) ecs.rename(icon.path)