All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
Short circuiting check for empty trash
is_empty()
is a short circuiting function that checks if the trash is empty on Freedesktop compatible systems and Windows.The main purpose of
is_empty()
is to avoid evaluating the entire trash context when the caller is only interested in whether the trash is empty or not. This is especially useful for full trashes with many items.
- 2 commits contributed to the release.
- 56 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
This release accelerates removing large folders by removing an unnecessary recursive check.
- 6 commits contributed to the release.
- 22 days passed between releases.
- 0 commits were understood as conventional.
- 1 unique issue was worked on: #114
- check for operation abort
- 3 commits contributed to the release.
- 52 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
To support non-UTF8 encoding in paths, the name
field changed from String
to OsString
in the TrashItem
struct. As it's a return value, one won't see
code break unless name
is actually used.
-
Support non-Unicode paths There are several spots where paths are assumed to be Unicode. However, some (all?) operating systems support non-Unicode paths which causes
trash-rs
to panic if encountered. I switched some of those code to useOsString
s instead ofString
s. Unfortunately, I had to add a new dependency,urlencoding
, in order to properly handle decoding non-UTF8 byte slices.As of this commit, the test suite passes and code should be ready, but I will try to remove the
url
crate and useurlencoding
in its place in the next commit.
- Use objc2-foundation
- Support non-UTF8 paths.
Note that this changes the type of returned paths to
OsString
from String, hence the breaking change.
- 11 commits contributed to the release over the course of 34 calendar days.
- 47 days passed between releases.
- 3 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Release trash v5.0.0 (
a754f4a
) - Prepare changelog prior to release (
02d1a8d
) - Support non-UTF8 paths. (
0971b8f
) - Update Windows code to account for API change (
e4b7119
) - Simplify Linux/BSD only tests for non-UTF8 paths (
559b57b
) - Impl test for listing invalid UTF8 trash items (
209db9d
) - Cleanup non-Unicode support for readability (
2f31116
) - Remove
url
and replace withurlencoding
(67fb256
) - Support non-Unicode paths (
15a15f8
) - Merge pull request #107 from madsmtm/objc2 (
46585ce
) - Use objc2-foundation (
58b99ef
)
- Release trash v5.0.0 (
This release updates the windows
dependency (on Windows) to v0.56.
- 4 commits contributed to the release.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- add
os_limited::trash_folders()
for use on many unixes.
- 5 commits contributed to the release.
- 7 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
-
Assure directory deletions on Windows don't put the entire contents into the trash. Instead, like on other platforms, on Windows it will now put the folder into the trash instead.
Please note that this is not a breaking change in terms of API, but a potentially breaking change with older Windows versions. It's unknown if there are side-effects, as it's unknown why Windows had special behaviour previously.
- 5 commits contributed to the release.
- 28 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Use
AtomicI32
instead of I64 for compatibility witharmel
- 2 commits contributed to the release.
- 2 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #99
view details
- improved error granularity Inform about operating-system specific errors more clearly, thus avoid degenerating error information.
- Use
AtomicI32
in tests for compatibility witharmel
platform
- 6 commits contributed to the release over the course of 5 calendar days.
- 25 days passed between releases.
- 2 commits were understood as conventional.
- 1 unique issue was worked on: #99
view details
- find best-possible trash dir, e.g. use
/run/foo/.trash
instead of/run/.trash
when deleting/run/foo/bar
.
- 10 commits contributed to the release.
- 5 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Release trash v3.2.1 (
d7abb5b
) - Find best-possible trash dir, e.g. use
/run/foo/.trash
instead of/run/.trash
when deleting/run/foo/bar
. (bb868d6
) - Refactor (
8cb3f75
) - Cargo fmt (
0b42fc0
) - Use unstable sort (
18dadef
) - Fixing method os (
8ba855e
) - Sort mount points first (
b2e4cf2
) - Refactor (
da8ce63
) - Fix clippy error (
8f74b17
) - Fixing sometimes choosing incorrect mount point if substring of each other (
1e9df03
)
- Release trash v3.2.1 (
- provide
os_limited::metadata()
. Metadata is currently limited to the amount of things, like bytes or entries, in the metadata item, but there is potential for adding more later.
- update ci job to use cargo-cross
- 14 commits contributed to the release.
- 2 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Release trash v3.2.0 (
03aa7ac
) - Provide
os_limited::metadata()
. (aa8e504
) - Refactor (
8dad3df
) - Address review comments (
63639c3
) - Stub for get_mount_points on unsupported targets (
fd89ea5
) - Windows implementation (
1a1f75e
) - Add metadata function, implement for freedesktop (
3bea3e2
) - Merge pull request #92 from TD-Sky/unknown-to-fs-error (
916d769
) - Accepting generic type instead of
&Path
(17411be
) - Be consistent with the style of the project (
7ee2617
) - Keep error converter function and rename it
fs_error
(a08118c
) - More precise file system error (
c51aa78
) - Merge pull request #90 from fujiapple852/build-add-cargo-cross-ci (
695af32
) - Update ci job to use cargo-cross (
be43b09
)
- Release trash v3.2.0 (
This release fixes compile errors on DragonFly, a fork of FreeBSD.
- 4 commits contributed to the release.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- compilation on FreeBSD should work now. #(86)
- 5 commits contributed to the release over the course of 9 calendar days.
- 9 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- compatibility with OpenBSD and NetBSD
- allow passing in items' ownership or reference
- describe how to retry restoring when encountering
RestoreCollision
error
- 10 commits contributed to the release.
- 88 days passed between releases.
- 3 commits were understood as conventional.
- 1 unique issue was worked on: #84
view details
- #84
- Compatibility with OpenBSD and NetBSD (
24e0cb6
)
- Compatibility with OpenBSD and NetBSD (
- Uncategorized
- Release trash v3.1.0 (
be17cd2
) - Bump minor version to indicate a feature change (
ddb9917
) - Merge pull request #81 from TD-Sky/re-restore (
c87a946
) - Test edition bump (
b77bd6d
) - Bump version (
75cc270
) - Update dependencies (
7d1e2bb
) - One step closer (
aee3dce
) - Allow passing in items' ownership or reference (
0789b23
) - Describe how to retry restoring when encountering
RestoreCollision
error (554c273
)
- Release trash v3.1.0 (
- don't recurse into symlink when trashing a directory on windows.
- 4 commits contributed to the release.
- 5 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
YANKED: It was discovered that symlinks aren't handled correctly, which can lead to removals of unrelated directory trees.
- On windows,
delete()
will now delete recursively like on the other platforms. Note that the current implementation may consume a lot of memory as it will traverse the entire directory structure once while storing each path for later trashing.
- 9 commits contributed to the release over the course of 1 calendar day.
- 4 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Release trash v3.0.5 (
4655a07
) - Upgrade serial-test crate (
0354d36
) - On windows,
delete()
will now delete recursively like on the other platforms. (c1feece
) - Refactor (
41edcdf
) - Removed self as parameter only used in recurssion. (
a7619c1
) - Reorganized code for cross-platform compatibility. (
1c09e48
) - Use recursive deletion on Windows by default. (
46e0697
) - Removed Windows only restriction for recursive deletion test. (
d363dd8
) - Merge branch 'Byron:master' into bug/windows_nonempty_folder (
0f4b2c8
)
- Release trash v3.0.5 (
- Don't use 'oldtime' feature of
chrono
by controlling exactly which features are enabled. That particular feature has a rustsec advisory up against it.
- 3 commits contributed to the release.
- 19 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #75
view details
- disallow empty paths from being deleted. Previously passing "" for deletion wuold delete the current working directory as it would canonicalize any input path without validating the path is non-empty.
- 3 commits contributed to the release over the course of 11 calendar days.
- 25 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #73
view details
- broken symlinks won't cause failure anymore on freedesktop platforms.
- 4 commits contributed to the release.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- bump
windows
crate to 0.44 Merge branch 'bump-windows-0.44'
- 5 commits contributed to the release over the course of 61 calendar days.
- 64 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Clippy helped 1 time to make code idiomatic.
view details
- Upgrade from
windows
v0.37 to v0.43.
- 5 commits contributed to the release.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Make chrono a default-enabled optional feature.
This allows to turn chrono support off without actually affecting the
ability to trash and restore items.
chrono
still has issues to dubious local-time support which relies on a c-library function that can cause undefined behaviour as it accesses an environment variable in a non-threadsafe fashion.
- 5 commits contributed to the release.
- 40 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #39
view details
- upgrade the
windows
crate to v0.37 to resolve a build issue and lay the foundation for more regular updates of the windows support.
- 3 commits contributed to the release.
- 8 days passed between releases.
- 0 commits were understood as conventional.
- 2 unique issues were worked on: #39, #51
view details
- include
windows
crate only on windows for reduced CI build times from ~9s to ~4s.
- 5 commits contributed to the release.
- 3 days passed between releases.
- 0 commits were understood as conventional.
- 1 unique issue was worked on: #5050505050
view details
-
avoid inconsistency when using relative paths in trashed file info. We use absolute paths now without trying to generate a relative path based on some top directory as the latter seems to be causing inconsistencies on some linux distros, as the restore path ends up being incorrect.
Rather go with the absolute truth and don't fiddle with path transformations at all to make it work everywhere.
- 2 commits contributed to the release.
- 2 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #39
view details
-
Properly reconstruct paths when restoring files on freedesktop if those were relative.
Previously it would be unable to reconstruct original paths if the trash directory was on a mount point due to a 'split brain' of sorts.
When trashing files it would create original path information based on them being relative to a mount point, but when restoring them it would reconstruct them to be relative to the trash top level directory.
Now the reconstruction happens against to mount point itself which makes restoration match.
- 7 commits contributed to the release over the course of 2 calendar days.
- 3 days passed between releases.
- 1 commit was understood as conventional.
- 1 unique issue was worked on: #47
view details
- #47
- Uncategorized
- Leading directories are now created on linux to avoid errors when trashing nested directories.
- 8 commits contributed to the release.
- 103 days passed between releases.
- 0 commits were understood as conventional.
- 2 unique issues were worked on: #45, #47
view details
We detected the possibility of UB in the Linux and FreeBSD versions of get_mount_points()
and reduced the likelihood
of it happening in a multi-threaded environment by synchronizing access. You can read more about the state of
a more permanent fix in the tracking issue.
All previous 2.0.* releases which contained this function were yanked from crates-io.
- Make internal
get_mount_points()
thread-safe to reduce chance of UB greatly. This may reduce performance of crates that are using trash from multiple threads somewhat, as a part of the operation is now synchronized. - Fix build on FreeBSD, handle UB similarly to the above.
- 10 commits contributed to the release over the course of 30 calendar days.
- 30 days passed between releases.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Release trash v2.0.4 (
c7edcb1
) - Prepare changelog for next release (
b65f574
) - Add Mutex to linux version of get_mount_points(); document UB chance in lib.rs (
c5c9c5e
) - Use Mutex to prevent concurrent access to getmntinfo (
5c8e0ce
) - Merge pull request #43 from wezm/num-threads-freebsd (
8f10c85
) - Fix build on FreeBSD after refactor (
f3d31e5
) - Use
num_threads()
to avoid UB in FreeBSD version of get_mount_points() (3c153ae
) - Refactor (
92ab7b9
) - Add BSD compatible implementation of get_mount_points (
82d2132
) - Run
cargo-diet
for a more minimal crates package (561f21d
)
- Release trash v2.0.4 (
- let dependency specification in Cargo.toml match cfg directives in code This fixes issue 40.
- 6 commits contributed to the release.
- 1 commit was understood as conventional.
- 2 unique issues were worked on: #37, #40
view details
- Fix failing to delete files on some freedesktop (eg Linux) systems when the home was not mounted at the root.
- The
list
function now returns an empty list if there is no trash directory (it used to return an error). - Fix for test failing on Linux environments that don't have a desktop environment (more specifically don't have a tool like
gio
)
- 10 commits contributed to the release over the course of 104 calendar days.
- 108 days passed between releases.
- 0 commits were understood as conventional.
- 3 unique issues were worked on: #34, #35, #36
view details
- Fix not being able to trash any item on some systems.
- 4 commits contributed to the release.
- 11 days passed between releases.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- The "Linux" implementation was replaced by a custom Freedesktop implementation.
list
,purge_all
, andrestore_all
to Windows and Freedesktop
- 32 commits contributed to the release over the course of 4 calendar days.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Merge pull request #11 from ArturKovacs/v2-dev (
3dcac24
) - Merge branch 'v2-dev' of https://github.com/ArturKovacs/trash-rs into v2-dev (
e9047a3
) - Update the version number (
28307a6
) - Add test for NsFileManager delete method (
8aea6ef
) - Run cargo fmt (
3ce2160
) - Fix clippy error (
2158550
) - More tweaks (
ee2527a
) - Minor tweaks (
1c43fe7
) - Update readme, add changelog (
4c1ece3
) - Add more logging to the freedesktop implementation (
a94b4ce
) - Remove the Filesystem error kind (
1138d8c
) - Don't run the CI for the nightly Rust (
afa33ba
) - Fix clippy error (
a182fbc
) - Fix freedesktop errors (
afd17c3
) - Update the list example (
a18d055
) - Fix warnings on macOS (
f12cea9
) - Tweaked tests and documentation (
330b1ec
) - Documentation improvements (
18337bf
) - Rename
extra
toos_limited
and other tweaks (29b6b11
) - Update the macOS backend (
eff82e4
) - Update the macos backend (
e739014
) - Removed the silly PlatformApi error (
61fa667
) - Implement restore_all for windows (
baa5171
) - Implement purge_all on Windows (
9fc224d
) - Remove the WinNull workaround (
d8ab41f
) - Ran cargo fmt (
cf13e78
) - Implement the
list
function for windows (6e77795
) - Implemented the delete function using
windows-rs
(218d0d0
) - Fix example (
69dbe38
) - Don't track the lockfile (
942108d
) - Merge branch 'master' into v2-dev (
c2d7a35
) - Minor adjustments (
314e808
)
- Merge pull request #11 from ArturKovacs/v2-dev (
- 18 commits contributed to the release.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Fix for clippy error (
a728dce
) - Increment version and update fmt (
6d2270a
) - Ran fmt and fix for warning (
ff7cf3b
) - Fix for path canonicalization (
5dfe5dc
) - Merge pull request #23 from cbr9/optimize--get-desktop-environment (
c887b6b
) - Optimized get_desktop_environment() (
a0a7fbb
) - Update readme (
30427f0
) - Oops that Path wasn't completely unused after all (
ba850ee
) - Fixed compile warning and ran rustfmt (
c556d28
) - Removed Cargo.lock from the gitignore. (
cdde3a7
) - Implement
delete
anddelete_all
for macOS (cb564ef
) - Updated readme (
7a298be
) - Implement
delete
anddelete_all
for windows. (d9a25c8
) - Add
delete
functions for Linux (fedeb83
) - Update to the readme, incorporating some suggestions by Caleb Bassi (
9bddccc
) - Merge pull request #18 from cjbassi/rename-files (
c49b496
) - Rename readme and license files (
5a9a5a6
) - Adds a deprecated attribute to the
is_implemented
function. (386db96
)
- Fix for clippy error (
- 2 commits contributed to the release.
- 87 days passed between releases.
- 0 commits were understood as conventional.
- 1 unique issue was worked on: #17
view details
-
port mac implementation to work with v2 Updates the existing Mac implementation to compile with v2 of the library. Does not add any new functionality other defining required methods.
Tests fail for methods relating to
list
,purge_all
, orrestore_all
, which are unimplemented.
- 59 commits contributed to the release.
- 218 days passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Update readme and increment the patch field in the version number. (
217b473
) - Merge pull request #15 from myfreeweb/bsd (
5af79ab
) - Build "linux" module on *BSD (any non-macOS unix) (
9e38ff8
) - Fix clippy warnings on linux. (
0731a64
) - Merge branch 'master' of https://github.com/ArturKovacs/trash (
1e43dc1
) - Add .vscode to gitignore (
f63f7ce
) - Fix for clippy warning. (
80eba00
) - Ran
cargo fmt
. (b753689
) - Add tests for Windows and MacOS as well as the nightly toolchain. (
29876c7
) - Default rust workflow (GitHub Actions) (
cf7d22f
) - Merge branch 'master' into v2-dev (
32de332
) - Merge branch 'master' into v2-dev (
b3ea819
) - Remove Azure test (
3e7db4f
) - Add GitHub Actions test (
0c8b1fa
) - Fix wording in Readme (
7025e10
) - Update Readme to reflect the state of development. (
a31a944
) - Merge pull request #9 from NilsIrl/patch-1 (
02bb739
) - Fix typo (
6c4d650
) - Added test cases and extra documentation. The test cases cover empty input for
purge_all
andrestore_all
. (c275449
) - Moved Linux and Windows specific features to a mod (
0e2fc93
) - Refined windows implementation. Added error kind
RestoreTwins
. (d105553
) - Ran
cargo fmt
(743b2f3
) - Merge branch 'v2-mac' into v2-dev (
62a7218
) - Merge branch 'v2-dev' of https://github.com/ArturKovacs/trash into v2-dev (
90d3fa6
) - Removed the two previously added errors. Replaced
ZeroMountPointsFound
andCantOpenMountPointsFile
withpanic!
after coming across https://lukaskalbertodt.github.io/2019/11/14/thoughts-on-error-handling-in-rust.html and reading http://joeduffyblog.com/2016/02/07/the-error-model/ (fa03282
) - No need for those parentheses (
534677e
) - Merge branch 'v2-dev' of https://github.com/ArturKovacs/trash into v2-dev (
00fc235
) - Add missing error kinds.
ZeroMountPointsFound
andCantOpenMountPointsFile
were added. (6c79f7d
) - Improve collision handling and add collision test. (
6db249b
) - Merge pull request #7 from ArturKovacs/v2-linux (
b957f38
) - Remove debug lines. (
3ab9217
) - Fix creating the home trash folder. (
10364c6
) - Create home trash if doesn't yet exist. Also added debug print line numbers. (
e1b2aae
) - Attempt to add RUST_BACKTRACE=1 again. (
7bd6023
) - Merge branch 'v2-dev' into v2-linux (
303a274
) - Added RUST_BACKTRACE=1 to test. (
c1cb106
) - Merge branch 'v2-dev' into v2-linux (
ecf521f
) - Add ability to trash items from an external drive. (
16f0ee1
) - Added a partialy implementaiton of
remove_all
. Can't remove from non-root devices or partitions. (1e03167
) - Steps towards implementing
remove_all
. (20ba354
) - Fix for
list
failing on Linux. This happened becauselist
on Linux didn't handle paralell threads manipulating the trash correctly. (d6cb6ba
) - Merge pull request #6 from ayazhafiz/refactor/mac2 (
adf0ea4
) - Remove the Cirrus CI config. (
fd597fc
) - Port mac implementation to work with v2 (
576fad7
) - Add MacOS and Linux as targets for CI tests. (
e409a98
) - Fix OS setup in Azure's config. (
08db817
) - Update Azure's target operating systems. (
cfb25b6
) - Add Azure Pipelines CI. (
760dfa6
) - Add Cirrus CI test. (
e5c22c4
) - Added implementation of purge_all for Linux. Also ran rustfmt and created a rustfmt config. (
a90f9bf
) - Now using the url crate for parsing the original location on Linux. (
02ffe0b
) - Add
list
implementation for linux. (5c73fea
) - Add note about coming features in version 2 to the Readme. (
dddbe25
) - Improve the Error type and add
create_remove_empty_folder
test. (a940b66
) - Changed
std::mem::uninit
andstd::mem::zeroed
tostd::mem::MaybeUninit
. Plus ran Rustfmt. (632a6fb
) - Now
purge_all
doesn't show a dialog on windows. (07e3bc2
) - Fix
purge_all
andrestore_all
reading invvalid memory and not executing the operation on the requested items. Add test cases forpurge_all
andrestore_all
. Test are now thread safe. (22d5181
) - Implement
purge_all
andrestore_all
for Windows. (e06c825
) - Run rust fmt. Implement
list
for Windows. (3f29636
)
- Update readme and increment the patch field in the version number. (
-
port mac implementation to work with v2 Updates the existing Mac implementation to compile with v2 of the library. Does not add any new functionality other defining required methods.
Tests fail for methods relating to
list
,purge_all
, orrestore_all
, which are unimplemented.
- implementation for macOS Moves files to trash on macOS by executing an AppleScript command to delete all requested paths.
- 19 commits contributed to the release over the course of 99 calendar days.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
view details
- Uncategorized
- Updated version number and readme (
79ee69e
) - Merge pull request #1 from ayazhafiz/feat/mac (
48a6b11
) - Implementation for macOS (
d68cc2a
) - Fix wrong code references in the linux implementation. (
037fed8
) - Add docs badge to readme (
88261d5
) - Increment version number (
f758543
) - Improve readme. Add remove_all function to mac as unimplemented. (
2850270
) - Merge branch 'master' of https://github.com/ArturKovacs/trash (
a651d0f
) - Add folder remove test (
b7bb22f
) - Updated the Cargo.toml (
1ec1ef9
) - Add license (
1725e61
) - Add doc comments (
b16a1d3
) - Fix Windows compile error. (
15e801e
) - Add the
remove_all
function. (f033dc3
) - Minor refactoring. (
9c7363d
) - Add Linux support. (
0429d3b
) - Fixed platform specific compilation (
84cba5b
) - Changed required winapi version. (
d49bce8
) - Initial (
4c23314
)
- Updated version number and readme (