Update file_browser.lua (#495)

Double-clicking an item in the search results would return an error - "file not found". Pass `node.Ref` to GetNodePath() instead.
This commit is contained in:
Rubik 2025-02-09 01:42:28 -05:00 committed by GitHub
parent 620d3ba776
commit 14d3673dc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -173,7 +173,7 @@ function BROWSER:DoNodeLeftClick(node)
node:SetExpanded() -- It's a folder, expand/collapse it node:SetExpanded() -- It's a folder, expand/collapse it
end end
else else
AdvDupe2.UploadFile(GetNodePath(node)) AdvDupe2.UploadFile(GetNodePath(node.Ref))
end end
else else
self:SetSelected(node) -- A node was clicked, select it self:SetSelected(node) -- A node was clicked, select it
@ -440,7 +440,7 @@ function BROWSER:DoNodeRightClick(node)
end) end)
else else
Menu:AddOption("Open", function() Menu:AddOption("Open", function()
AdvDupe2.UploadFile(GetNodePath(node)) AdvDupe2.UploadFile(GetNodePath(node.Ref))
end) end)
Menu:AddOption("Preview", function() Menu:AddOption("Preview", function()
local ReadPath, ReadArea = GetNodePath(node) local ReadPath, ReadArea = GetNodePath(node)