-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chattr / chflags dialog + misc #2614
Open
akruphi
wants to merge
9
commits into
elfmz:master
Choose a base branch
from
akruphi:misc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ExMessager::AddMultiline()
& tuning after auto select Russian language if system locale is ru_RU on first start #2576Возможно странно ловятся ошибки работы с атрибутами: для устройств или любых файлах на разделах, не поддерживающих атрибуты, - ловятся, а для симлинков на обычных разделах нет ошибки, хотя и lsattr и mc->File->chattr на них также ругаются кодом 95 "Operation not supported".
Но по всей навороченной касакдности вызовов внутри far2l (sdc_fs_flags_get
обернутое вокругbugaware_ioctl_pint
) я запутался теряются ли там errno или просто lsattr не умеет, то что умеет ext4.Разобрался - см. ниже UPD3.
<linux/fs.h>
и<sys/stat.h>
атрибутов/флагов.(!) Протестировано только на linux - возможно на *BSD или macOS будут сюрпризы, хотя вроде бы не должно - в коде все системно зависимые места максимально обложены
#ifdef
.UPD2: в тг-чате обратили внимание, что
Проверил - действительно иногда есть такое - очень странное поведение при том, что никаких выделенных '[' там нет - это просто второй символ в строке списка (первый либо ' ', либо '*').
Это общее для всех VMenu и связано с реализацией горизонтальной прокрутки:
far2l/far2l/src/vmenu.cpp
Lines 1215 to 1222 in 9fb2133
VMenu::ProcessMouse()
такое поведение не поменять - наверное когда-то в будущем 🤯UPD3:
Разобрался, взглянув внимательнее в потроха: в WinPort/src/sudo/sudo_client_api.cpp в
sdc_fs_flags_get()
иsdc_fs_flags_set()
для именно Linux используетсяopen(path, O_RDONLY);
к которому затем применяетсяbugaware_ioctl_pint(fd, FS_IOC_GETFLAGS, flags);
. Так вотopen()
без маскиO_NOFOLLOW
переходит по symlink и работает с целевым файлом. Для *BSD/macOS используетсяsdc_stat
, который такое вроде вытворять не должен.Как про такое поведение предупреждать пользователей? Добавить строку как и в Ctrl+A, например, "For symlinks flags are displayed and will be modified for the original object"? Или сразу, если работаем с симлинк, то делать { Set } disabled и не позволять менять галочки?Сделал всегда жесткое предупреждение и отвал без показа флагов: