Latest post of the previous page:
x64 же.
Надо будет собрать dll.
Latest post of the previous page:
x64 же.
Просьба по небольшому усовершенствованию. Есть symlink AllUsers, который ведет на C:\ProgramData. Если я использую Ваш плагин, он мне так и показывает: "C:\ProgramData"
Можно сделать что угодно, скрипт простой и в комментариях не нуждается.
Собрал, вложение заменил.
<link>
(надо исправить в настройках режима панели).Поставил и настроил. И в x86, и в x64 работает хорошо. Удобнее стало. Благодарю Вас за полезный плагин!John Doe wrote:Собрал, вложение заменил.
Колонка теперь называется<link>
(надо исправить в настройках режима панели).
Спасибо! Теперь гораздо нагляднее стало!!!
Шикарный пример реализации контент-плагинов на LUA. Это не микроплагин, а целый прорыв! Спасибо большое. Я так долго искал. Уже начал исходники на С++ пилить под себя...
Code: Select all
function export.GetContentData(FilePath,ColNames)
local data = {}
for i,v in ipairs(ColNames) do
if v:lower()=="link" then
local attr = win.GetFileAttr(FilePath)
if attr and attr:find"e" then
if FilePath=="\\\\?\\C:\\Users\\username\\OneDrive" then -- <======= с таким костылем не падает
data[i]="bug"
else
data[i] = "→"..far.GetReparsePointInfo(FilePath)
end
end
end
end
return next(data) and data
end
Code: Select all
╔══════════════════════════ Exception occurred ═══════════════════════════╗
║ Exception: 0xC00000FD - EXCEPTION_STACK_OVERFLOW ║
║ Details: A new guard page for the stack cannot be created. ║
║ errno: ║
║ LastError: ║
║ NTSTATUS: ║
║ Address: 0x7FF9FC92D4CC - ntdll.dll!RtlWalkFrameChain ║
║ Source: ║
║ Function: GetContentDataW ║
║ Module: C:\Program Files\Far Manager\Plugins\Links\c0link-x64.dll ║
╟─────────────────────────────────────────────────────────────────────────╢
║ { Unload plugin } [ Stack ] [ Minidump ] [ Ignore ] ║
╚═════════════════════════════════════════════════════════════════════════╝
Code: Select all
function export.GetContentFields(ColNames)
for i,v in ipairs(ColNames) do
if v:lower()=="link" then return true end
end
end
function export.GetContentData(FilePath,ColNames)
local data = {}
for i,v in ipairs(ColNames) do
if v:lower()=="link" then
local attr = win.GetFileAttr(FilePath)
if string.find(string.reverse(FilePath),"\\")==1 then
data[i] = ".."
elseif attr and attr:find"e" and far.GetReparsePointInfo(FilePath)~=nil then
data[i] = "->"..string.gsub(far.GetReparsePointInfo(FilePath),"\\+%?+\\","")
else
data[i] = string.gsub(string.sub(FilePath,-string.find(string.reverse(FilePath),"\\")+1),"\\+%?+\\","")
end
end
end
return next(data) and data
end
Code: Select all
-- https://forum.farmanager.com/viewtopic.php?p=132337#p132337
local c0 = {
GetContentFields = function(ColNames)
for i,v in ipairs(ColNames) do
if v:lower()=="link" then return true end
end
end;
GetContentData = function(FilePath,ColNames)
local data = {}
for i,v in ipairs(ColNames) do
if v:lower()=="link" then
local attr = win.GetFileAttr(FilePath)
if attr and attr:find"e" then
data[i] = "→"..(far.GetReparsePointInfo(FilePath) or "(data not available)")
end
end
end
return next(data) and data
end
}
if not Far then
for k,v in pairs(c0) do export[k] = v; end
elseif ContentColumns then
ContentColumns(c0)
end