Commit graph

57 commits

Author SHA1 Message Date
Jonatan Pettersson
41cdf89604 feat: allow setting permissions in multi preview
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.
2026-04-02 13:43:03 -06:00
Ashley Wulber
f6ca0cb460 cleanup 2026-03-24 16:29:56 -04:00
Vukašin Vojinović
6e2eafe16c chore: clippy 2026-03-24 11:25:59 -06:00
Jason Rodney Hansen
7a90e62093 fix: preserve modified time when creating/extracting zip files 2026-02-28 14:18:36 -07:00
Ric's Dev
14c96a466e feat: Show count of files affected when 'Replace all' is selected in copy/move operations 2026-02-15 19:33:18 +01:00
Frederic Laing
08d442aee2
feat: paste images, videos, and text from clipboard 2026-02-04 08:12:32 +01:00
Vukašin Vojinović
fcaf6c7e30 chore: update dependencies 2026-01-30 21:10:00 +01:00
Vukašin Vojinović
1e25e7dd69 chore: clippy 2026-01-30 21:05:46 +01:00
Vukašin Vojinović
d9f654ffe3 improv(zip_extract): flush files to disk
This ensures the files are fully on the disk when the operation is done.
2026-01-25 01:22:14 +01:00
Vukašin Vojinović
1963e58560 perf(copy): async batch file flushes
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.
2026-01-24 13:46:53 +01:00
Jeremy Soller
a88e765961
Copy file times, fixes #1294 2026-01-14 11:17:00 -07:00
Your Name
977c878600 Empty trash as much as possible
Fixes #1134
2025-12-19 11:52:07 -07:00
Cheong Lau
bd1fa1f0a9 perf: general minor performance optimisations
Notably there is some code cleanup with the zooming functionality, I've
created a new module to reduce code duplication.
2025-10-29 08:16:50 +10:00
Cheong Lau
5f729829d7 chore: more pedantic clippy suggestions 2025-10-29 08:10:19 +10:00
Ashley Wulber
e6da0a8ae5 chore: focus replace & favorite path dialog buttons 2025-10-22 14:10:15 -04:00
Ashley Wulber
6615e0a2b7 fix: focus button for permanently delete dialog 2025-10-22 14:10:15 -04:00
Vukašin Vojinović
f95869a631 chore: migrate to Rust 2024 edition 2025-09-11 08:15:26 -06:00
Josh Megnauth
d8acbd2ce0 Fix extracting password protected archives
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.
2025-09-09 07:52:32 -06:00
Jeremy Soller
e3c793a44d
Move archive handling to archive.rs 2025-08-04 15:13:55 -06:00
Jason Rodney Hansen
54b884e5f8 Add ability to remove files from Recents 2025-07-11 09:38:13 -06:00
Jeremy Soller
5a01fb95ff
Ensure replace dialog shown for renames 2025-07-11 09:37:28 -06:00
Gwen Lg
b0e89cd5e3
fix some typos in comment or var name (#1027)
indicated by `typos` tool : https://github.com/crate-ci/typos/
2025-06-18 16:40:55 -06:00
Jeremy Soller
051001b9ea
Implement setting permissions, fixes #325 2025-05-16 09:39:53 -06:00
Jeremy Soller
72c7374d4c
Ignore failures to set permissions when copying, fixes #909 2025-05-15 11:40:59 -06:00
Jeremy Soller
69618b1bac
Fix finished progress 2025-05-15 11:35:06 -06:00
Jeremy Soller
4bf72d9f6a
Handle bz2 mimetypes 2025-05-07 10:10:39 -06:00
Jeremy Soller
6fa890e3f3
Attempt atomic renames when moving top-level files and folders, fixes #607 2025-04-29 19:12:33 -06:00
Jeremy Soller
4f7d13f391
Merge branch 'permanently-delete' of https://github.com/gwen-lg/cosmic-files 2025-04-29 18:39:11 -06:00
Jeremy Soller
5573e36400
Copy to external drives when drag and dropping, part of #828 2025-04-29 18:07:57 -06:00
Jeremy Soller
dd98622cfa Reduce features used on remote filesystems
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.
2025-04-29 14:51:11 -06:00
Tim Dengel
1a66d7b184 Support permanently deleting files and directories using Shift+Del
Add a confirmation dialog to limit risks of data lost.
2025-04-29 20:18:30 +02:00
Joshua Megnauth
63176a1e2a
Fix macOS build (#944)
Closes #921
2025-04-22 08:13:43 -06:00
Jeremy Soller
d6f1efbf67
Only write what was read during copy, fixes #931 2025-04-10 18:14:24 -06:00
Michael Murphy
79aa8f887a
feat: use io_uring / IOCP when available for async file IO (#911)
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.
2025-04-09 15:15:07 -06:00
Jeremy Soller
28ec74d440
Use xz2 instead of liblzma, update dependencies 2025-03-31 09:05:32 -06:00
Jeremy Soller
40a02bb2fc
Ensure skip applies to cleanup operations, fixes #854 2025-03-07 09:29:48 -07:00
Jeremy Soller
c8aa80fb2f
Add operation to permanently delete trash items, fixes #841 2025-03-03 13:44:06 -07:00
l-const
ba98547acb
Fix unit test - fedora build. 2025-02-11 18:33:59 +02:00
Jeremy Soller
22bca8632b
Format 2025-02-04 15:41:16 -07:00
Jeremy Soller
2f668b0bd6
Merge pull request #779 from ellieplayswow/feature/compress-extract-password-zips
adding in support to extract/compress zip files with passwords
2025-02-03 13:25:12 -07:00
ellieplayswow
b4dae4bfa8 VecDeque makes more sense to maintain order of operations 2025-02-03 15:51:42 +00:00
ellieplayswow
a4d7a377d3 quick cleanup to some untranslated strings, moving zip extract dir creation order 2025-02-03 15:46:10 +00:00
ellieplayswow
22552c658f adding in support to extract/compress zip files with passwords 2025-01-29 21:19:03 +00:00
Josh Megnauth
8ff54d1522 chore(clippy): mime_app, operation, mounter
Fixes Clippy lints for:
* src/mounter/
* src/operation/
* src/mime_app.rs
* src/mouse_area.rs (I missed two of them last time)
2025-01-22 08:10:05 -07:00
Josh Megnauth
6a6a494012 chore(clippy): mouse_area, controller & more
Fixes lints for:
* src/operation/controller.rs
* src/mouse_area.rs
* src/mounter/mod.rs
2025-01-19 10:55:56 -07:00
Josh Megnauth
df2d01e9ba chore(clippy): thumbnailer.rs, two files in operation
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.
2025-01-19 10:55:41 -07:00
Josh Megnauth
0f5163acc6 fix: Strip more file names in extractor
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.
2025-01-14 08:48:02 -07:00
Jeremy Soller
b4b5e78abe
Move progress into controller to make it not block 2024-11-20 08:15:31 -07:00
Jeremy Soller
c4a08ead84
Fix tests 2024-11-19 20:18:37 -07:00
Jeremy Soller
24a7f2bc31
Select result of operation, fixes #500 2024-11-19 20:17:58 -07:00