Closed mskvsk closed 3 months ago
(I probably should have created this issue as a bug but not sure)
Can you provide more details please? e.g. the steps to reproduce?
If it's a bug, it's best to re-submit it as a bug report and fill out the template. This way, I can capture all the necessary information.
I wouldn't say it's exactly a bug, just an unhandled case.
Steps to reproduce:
touch test
sudo chattr +i test
, Macos sudo chflags uchg test
Behavior: Nothing happens
Expected behaviour: Show a warning/error to let the user know that it is impossible to delete that file due to the attribute being set. Ideally, give the user an option to remove the attribute and repeat the previous command.
I repeated your steps and observed:
Enter
to inspect the task, and got detailed reasons for the failure.https://github.com/sxyazi/yazi/assets/17523360/f9bb2946-3d02-46ed-8c5d-ec63a0d7f77f
Closing as something did happen, and this is the expected behavior.
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Please describe the problem you're trying to solve
Some files can have the immutable attribute.
Presently, if we try to rename or remove a file like this, nothing happens.
Would you be willing to contribute this feature?
Describe the solution you'd like
Ideally, Yazi should give an option to remove that attribute and go on with the operation.
Just notifying that that attribute is set would work too.
Additional context
Removing this attribute on Linux:
sudo chattr -i filename
On Macos:
sudo chflags nouchg filename