mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-27 04:48:05 +11:00
Remove overwrite confirmations because life is short and UX nitpick bugs are long.
Have fun with this. If anyone complains I'm calling it the April 1st release.
This commit is contained in:
parent
aef0043d4a
commit
f761ad5824
@ -94,12 +94,26 @@ function getFsNode(fs, parent, fsc, path, mode, impliedName)
|
|||||||
for k, v in ipairs(fsc.list(path)) do
|
for k, v in ipairs(fsc.list(path)) do
|
||||||
local nm = "F: " .. v
|
local nm = "F: " .. v
|
||||||
local fp = path .. v
|
local fp = path .. v
|
||||||
if fsc.isDirectory(fp) then
|
local cDir = fsc.isDirectory(fp)
|
||||||
|
if cDir then
|
||||||
nm = "D: " .. v
|
nm = "D: " .. v
|
||||||
end
|
end
|
||||||
|
if (not cDir) and (fscrw or mode == false) and (mode ~= nil) then
|
||||||
|
local vn = v
|
||||||
|
n[k + 1] = {nm, function () return selectUnknown(vn) end}
|
||||||
|
else
|
||||||
n[k + 1] = {nm, function () return nil, getFsNode(fs, t, fsc, fp, mode, impliedName) end}
|
n[k + 1] = {nm, function () return nil, getFsNode(fs, t, fsc, fp, mode, impliedName) end}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
table.insert(n, {"Copy", function ()
|
||||||
|
local rt, re = require("sys-filewrap").create(fsc, path, false)
|
||||||
|
if not rt then
|
||||||
|
return false, dialog("Open Error: " .. tostring(re), parent)
|
||||||
|
end
|
||||||
|
return nil, setupCopyVirtualEnvironment(fs, parent, rt, path:match("[^/]*$") or "")
|
||||||
|
end})
|
||||||
|
end
|
||||||
if fscrw then
|
if fscrw then
|
||||||
if dir then
|
if dir then
|
||||||
table.insert(n, {"Mk. Directory", function ()
|
table.insert(n, {"Mk. Directory", function ()
|
||||||
@ -151,24 +165,6 @@ function getFsNode(fs, parent, fsc, path, mode, impliedName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not dir then
|
if not dir then
|
||||||
table.insert(n, {"Copy", function ()
|
|
||||||
local rt, re = require("sys-filewrap").create(fsc, path, false)
|
|
||||||
if not rt then
|
|
||||||
return false, dialog("Open Error: " .. tostring(re), parent)
|
|
||||||
end
|
|
||||||
return nil, setupCopyVirtualEnvironment(fs, parent, rt, path:match("[^/]*$") or "")
|
|
||||||
end})
|
|
||||||
if (fscrw or mode == false) and (mode ~= nil) then
|
|
||||||
local tx = "Open"
|
|
||||||
if mode == true then
|
|
||||||
tx = "Save (Overwrite)"
|
|
||||||
elseif mode == "append" then
|
|
||||||
tx = "Append"
|
|
||||||
end
|
|
||||||
if fscrw or mode == false then
|
|
||||||
table.insert(n, {tx, selectUnknown})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif impliedName then
|
elseif impliedName then
|
||||||
table.insert(n, {"Implied: " .. impliedName, function ()
|
table.insert(n, {"Implied: " .. impliedName, function ()
|
||||||
return selectUnknown(impliedName)
|
return selectUnknown(impliedName)
|
||||||
|
Loading…
Reference in New Issue
Block a user