Update file_browser.lua (#496)

* Update file_browser.lua

This commit addresses a Lua error introduced with https://github.com/wiremod/advdupe2/pull/495

Sorry!

* Update file_browser.lua

Reverse change from https://github.com/wiremod/advdupe2/pull/495
This commit is contained in:
Rubik 2025-02-09 12:28:55 -05:00 committed by GitHub
parent 14d3673dc4
commit ccd7ba2e5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,6 +172,12 @@ function BROWSER:DoNodeLeftClick(node)
if (node.Expander) then
node:SetExpanded() -- It's a folder, expand/collapse it
end
elseif (node.Derma.ClassName == "advdupe2_browser_file") then
if (node.Control.Search) then
AdvDupe2.UploadFile(GetNodePath(node.Ref))
else
AdvDupe2.UploadFile(GetNodePath(node))
end
else
AdvDupe2.UploadFile(GetNodePath(node.Ref))
end
@ -440,7 +446,7 @@ function BROWSER:DoNodeRightClick(node)
end)
else
Menu:AddOption("Open", function()
AdvDupe2.UploadFile(GetNodePath(node.Ref))
AdvDupe2.UploadFile(GetNodePath(node))
end)
Menu:AddOption("Preview", function()
local ReadPath, ReadArea = GetNodePath(node)