Merge pull request #469 from Procybit/master

Фича. Ярлыки, закрепляемые в Dock, трансформируются в настоящие файлы.
This commit is contained in:
IgorTimofeev 2022-08-24 13:52:12 +07:00 committed by GitHub
commit b0d8e3e704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2450,6 +2450,11 @@ function system.updateDesktop()
}
dockContainer.addIcon = function(path)
-- RU чекаем новое прикрепление к dock, если ярлык, то ищем оригинальный файл и прикрепляем его
-- EN check the new attachment to the dock, if it's a shortcut, then look for the original file and attach it
while path:sub(-4) == ".lnk" do
path = system.readShortcut(path)
end
local icon = dockContainer:addChild(system.icon(1, 2, path, dockColors))
icon:analyseExtension(iconLaunchers)
icon:moveBackward()