This adds a Message::ShiftPermissions to handle setting
permissions for user, group or other for either 1 or
more items and a Command::SetMultiplePermissions to
set permissions on multiple items at the same time.
The permission dropdown will only have a selection if
all selected items have the same permission, otherwise it
will be empty but still allow changing.
Up to 5 owners and groups will be displayed for all
selected items with an ellipses if there are more.
The OperationSelection for setting permissions now also
returns the path as selected such that the tab will be re-scanned
and update the dropdown to correctly.
Instead of calling `sync_all()` on every file individually during the Copy operation, the flushing is now batched and done at the end. Flushing now also happens for Move.
Closes: #1157
The fix splits the "canceled" and "failed" states for OperationError. It
also preserves that state because some functions overwrote the state by
rewrapping the error.
This attempts to detect remote filesystems on Linux using the
/proc/self/mountinfo file and checking the filesystem against a
hardcoded list of remote filesystems. Remote filesystems will not
thumbnail, read file data to determine mime types, or calculate
directory sizes.
Spawns a single thread for handling async file IO on the [compio runtime](https://github.com/compio-rs/compio).
It is a completion-based IO runtime that can dynamically select a polling mechanism at runtime. It defaults to
io_uring on Linux, IOCP on Windows, and the polling crate everywhere else. On Linux systems where io_uring is
unavailable or disabled, it will fall back to the polling crate.
This eliminates most of the threads that were needed previously. It significantly reduced the amount of memory
needed in the recursive Context to get a good transfer rate for each copy operation—from a 4 MB buffer to 128 KB.
Copies on a nvme drive are somewhat faster with the async IO changes, and use less CPU than before.
Although it uses a single thread for non-blocking tasks, it still manages to 100% max out my nvme drive's
activity for the whole duration of multiple long transfers. But it would be possible to enable compio's
dispatcher to spread operations across worker threads if necessary.
All but the extract and compress operations were updated to be async. I had to switch the `CondVar` in the
`Controller` to a `tokio::sync::Notify` to prevent the IO thread from being put to sleep when an operation is paused.
Fixed a deadlock in the `operation_copy` test function that was performing an operation without concurrently pulling
from the channel in the operation. Reduced the rate that `Message::None` is sent from a subscription to trigger a UI
redraw, and fixed it to not run when operations are paused.
Fixes Clippy lints for:
* src/thumbnailer.rs
* src/operation/mod.rs
* src/operation/recursive.rs
One of the Clippy lints also involved fixing a TODO to replace a
deprecated function that malfunctioned under Windows.
Closes: #698
I ended up fixing a few Clippy lints while tracking down this problem.
It turns out that the issue was way simpler than I assumed: ".tar.xz"
needed to be added to a slice of extensions to strip.