2
0
mirror of https://github.com/qarmin/czkawka synced 2024-11-10 07:10:40 +00:00
Commit Graph

570 Commits

Author SHA1 Message Date
Rafał Mikrut
0fa6692d39
Fix error with saving results of name duplicates (#307) 2021-04-01 11:37:16 +02:00
Rafał Mikrut
50ad3f9873
Update to Rust 1.5.1 (#302) 2021-03-27 13:14:02 +01:00
Rafał Mikrut
ce8161fd7e Release 3.0.0 2021-03-11 21:41:33 +01:00
Rafał Mikrut
8c1140e40d
Allow to put files to trash instead fully remove them (#284) 2021-03-11 14:31:59 +01:00
Rafał Mikrut
8ad0b907ec
Open file when clicking at the Enter button (#285) 2021-03-11 14:31:41 +01:00
Douman
67a07f1f98
Use xxhash-rust >=0.8.2 to avoid bug in stateful implementation (#283) 2021-03-08 07:47:17 +01:00
Rafał Mikrut
43d76888c6
Add confirmation dialog when removing files with delete key (#282) 2021-03-07 08:57:48 +01:00
Rafał Mikrut
77cdf7e6a4
Add confirmation dialog when trying to remove all files in group (#281) 2021-03-06 15:56:39 +01:00
Rafał Mikrut
e3aca69499 Update Image dependency to fix crashes 2021-03-06 13:51:59 +01:00
Rafał Mikrut
0bbe9fe4a3 Revert "Disable for now broken tga and gif files (#270)"
This reverts commit 87f5ca63
2021-03-06 13:36:00 +01:00
Rafał Mikrut
17f97bd958
Add option to turn off cache (#263) 2021-03-04 12:09:53 +01:00
Thomas Andreas Jung
1d904a858e
Dryrun for duplicates (#277)
```
    czkawka_cli dup --dryrun -d $(pwd)/folder -m1 -D aen
    Found 2 duplicated files in 1 groups with same content which took 2 B:
    Size - 2 B (2) - 2 files
    /home/thomas/Development/czkawka/folder/a
    /home/thomas/Development/czkawka/folder/b
    ----

    -------------------------------MESSAGES--------------------------------
    Delete /home/thomas/Development/czkawka/folder/a
    Delete /home/thomas/Development/czkawka/folder/b
    ---------------------------END OF MESSAGES-----------------------------
    ```
2021-03-01 12:23:43 +01:00
Thomas Andreas Jung
ed7b197100
Use one implementation for all duplicate file removales (#278) 2021-02-27 09:00:59 +01:00
Rafał Mikrut
8382f77687
Fix crash when changing tabs (#280) 2021-02-27 07:30:30 +01:00
Rafał Mikrut
13add1cbed
Add hardlinking support for GUI (#276) 2021-02-24 13:53:46 +01:00
Rafał Mikrut
35c47b3230
Add new settings window (#262) 2021-02-23 09:40:19 +01:00
Rafał Mikrut
4c770b582b
Add option to not ignore hard links (#273) 2021-02-22 20:14:33 +01:00
Rafał Mikrut
814bd116c6 Add info about unofficial PPA 2021-02-22 17:26:08 +01:00
Rafał Mikrut
e4107f6517 Changed cargo sources 2021-02-22 13:35:16 +01:00
Rafał Mikrut
7ea0126525 Release 2.4.0 2021-02-22 12:24:05 +01:00
Rafał Mikrut
e0b6572f03
Update dependencies (#272) 2021-02-22 12:18:20 +01:00
Rafał Mikrut
145fa3f0e0 Modify about window, because it looks different on different themes 2021-02-22 11:54:25 +01:00
Rafał Mikrut
2e596f633a Remove all deprecated properties 2021-02-22 11:54:25 +01:00
Rafał Mikrut
b274372f8c Update to Glade 3.38.2 2021-02-22 11:54:25 +01:00
Rafał Mikrut
87f5ca63b9
Disable for now broken tga and gif files (#270) 2021-02-22 11:17:32 +01:00
Thomas Andreas Jung
e3457edab2
Use one implementation for all hash calculations (#268)
All implementations are the same they only differ by hasher and the file read
limit.
2021-02-22 10:52:21 +01:00
Thomas Andreas Jung
0f12897687
Support the hash type parameter in the CLI (#267)
https://github.com/qarmin/czkawka/issues/266
2021-02-21 05:59:07 +01:00
Thomas Andreas Jung
1e94587de8
Ignore duplicates if those are hard links (#234)
This is a proof of concept.

```
$ echo a > hardlinks/a
$ cp hardlinks/{a,b}
$ ln hardlinks/{a,c}
$ cargo run --bin czkawka_cli dup -m 1 --directories $(pwd)/hardlinks -f /dev/stderr > /dev/null
-------------------------------------------------Files with same hashes-------------------------------------------------
Found 1 duplicated files which in 1 groups which takes 2 B.

---- Size 2 B (2) - 2 files
/home/thomas/Development/czkawka/hardlinks/a
/home/thomas/Development/czkawka/hardlinks/b
```

Open:
- Windows support
- Probably this should be a cli option
2021-02-20 12:28:06 +01:00
krzysdz
4c205ce098
Windows taskbar progress support (#264)
* Initial Windows taskbar progress support

* Changes to COM (un)init

It turns out winapi exposes IIDs through a `uuidof()` function of interfaces, so the copied one can be removed.

* Don't return error codes

Now the `TaskbarProgress` functions fail silently.
The `TaskbarProgress` struct now will always be created (even in case of errors in initialisation), but it won't do anything.

* Fix builds for other systems

* Formatted code

* Fix progress shown after the operation finished

A progress update was received after the stop event.
Also `as_ref()` was removed in many places (I don't even know why it was there).

* Remove redundant call to hide

It's already called by the `glib_stop_receiver` receiver.

* Release the ITaskbarList3 and call CoUninitialize at exit

Because objects moved to closures used as fallbacks in GTK have [static lifetimes](https://gtk-rs.org/docs-src/tutorial/closures#closures), the `TaskbarProgress` will never be dropped.
To workaround this problem a `release` function is called when the main window is closed. This function behaves like `drop`, but sets the struct in a valid "empty" state, so that calling `release`/`drop` again won't cause problems.

* Don't set the NORMAL state manually

Because only NOPROGRESS and INDETERMINATE states are used, there is no need to set the NORMAL state when changing the progress value.

Now `set_progress_value` will also change the `TaskbarProgress::current_state` if such situation occurs.

> Unless [SetProgressState](https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressstate)
> has set a blocking state (TBPF_ERROR or TBPF_PAUSED) for the window, a call to **SetProgressValue** assumes the TBPF_NORMAL
> state even if it is not explicitly set. A call to **SetProgressValue** overrides and clears the TBPF_INDETERMINATE state.

See the [SetProgressValue documentation](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressvalue#how-the-taskbar-button-chooses-the-progress-indicator-for-a-group)
2021-02-20 12:24:36 +01:00
Dan Dascalescu
db255a87d4
Improve English (#260) 2021-02-20 09:57:11 +01:00
Dan Dascalescu
c035514a0e
Improve English for "Ask in future" button (#261) 2021-02-20 09:56:23 +01:00
krzysdz
2e7c5c2dcb
Fix Winows theme in CI (#265)
The admin-gtk3-dark-osx theme contains relative symlinks, which after copying only this theme are no longer valid.
The -L (--dereference) option makes cp always follow symbolic links, so that all of them are replaced with files they pointed to.
2021-02-20 09:55:36 +01:00
endolith
3ad1dfacbe
README: Fix a typo (#255) 2021-02-11 19:04:39 +01:00
Thomas Andreas Jung
03d41e173f
Keep original file if replacing duplicate with hardlink fails (#253)
If the user could not create a hard link (due to permissions or
different block devices) then czkawka lost the duplicate file.

```
$ mkdir hardlink
$ cd hardlink
$ echo a > a
$ cp a b
$ chown thetestuser:thetestuser a
$ ls -il .

25169246 -rw-rw-r-- 1 thetestuser thetestuser 2 Feb  7 11:18 a
25169641 -rw-rw-r-- 1 thomas      thomas      2 Feb  7 11:18 b

$ cargo run --bin czkawka_cli dup --directories $(pwd) -m 1 -f
test101.result --delete-method HARD

[...]
-------------------------------WARNINGS--------------------------------
Failed to link /home/thomas/Development/czkawka/hardlink/b ->
/home/thomas/Development/czkawka/hardlink/a
---------------------------END OF WARNINGS-----------------------------

$ ls -il .
25169246 -rw-rw-r-- 1 thetestuser thetestuser 2 Feb  7 11:18 a
```

Now czkawka keeps all files and the warning provides more information
why czkawka can't replace the duplicate with a hard link.

```
$ cargo run --bin czkawka_cli dup --directories $(pwd) -m 1 -f
test101.result --delete-method HARD

-------------------------------WARNINGS--------------------------------
Failed to link /home/thomas/Development/czkawka/hardlink/b ->
/home/thomas/Development/czkawka/hardlink/a (Operation not permitted (os
error 1))
---------------------------END OF WARNINGS-----------------------------
[...]

25169246 -rw-rw-r-- 1 thetestuser thetestuser 2 Feb  7 11:18 a
25169641 -rw-rw-r-- 1 thomas      thomas      2 Feb  7 11:18 b
```
2021-02-11 19:04:23 +01:00
Rafał Mikrut
10156ccfd3 Uncomment code about saving similar images result to file 2021-02-09 17:29:49 +01:00
Rafał Mikrut
df44f9c342
Update list of checked images (#252) 2021-02-06 14:24:15 +01:00
Rafał Mikrut
9bb574235a
Add checking for broken music opt-in (#249) 2021-02-05 19:07:20 +01:00
Thomas Andreas Jung
3ffa55b008
Add delete method to replace duplicate files with hard links (#236)
This results in the same space saving but keeps the "deleted" files around.

$ mkdir hardlink
$ cd hardlink
$ echo a > a
$ cp a b
$ ln a c
$ touch -t 01010000 a
$ ls -il --time-style=full-iso .
25169323 -rw-rw-r-- 2 thomas thomas 2 2021-01-01 00:00:00.000000000 +0100 a
25169558 -rw-rw-r-- 1 thomas thomas 2 2021-01-31 18:11:08.298161098 +0100 b
25169323 -rw-rw-r-- 2 thomas thomas 2 2021-01-01 00:00:00.000000000 +0100 c

$ czkawka_cli dup --directories $(pwd)/hardlink -m 1 -f hardlink.result --delete-method HARD

$ ls --time-style=full-iso -li hardlink
25169323 -rw-rw-r-- 3 thomas thomas 2 2021-01-01 00:00:00.000000000 +0100 a
25169323 -rw-rw-r-- 3 thomas thomas 2 2021-01-01 00:00:00.000000000 +0100 b
25169323 -rw-rw-r-- 3 thomas thomas 2 2021-01-01 00:00:00.000000000 +0100 c
2021-02-05 17:59:34 +01:00
Sbgodin
f490a1169c
Typos corrected in README.md (#248) 2021-02-05 17:00:24 +01:00
Rafał Mikrut
ea474c2af0 Fix typo in window progress 2021-02-03 20:23:28 +01:00
Rafał Mikrut
9f3da0e70f
Add support for CRC32 and XXH3 hash (#243) 2021-02-03 19:59:06 +01:00
Rafał Mikrut
7d8334bb0c
Add template for multiple hashes (#240) 2021-02-03 18:11:04 +01:00
Alexis Lefebvre
2f09b6ce8f
README: Allow Snap to access to external drives (#218) 2021-02-03 16:04:36 +01:00
Rafał Mikrut
8dcb718843 Restore snap confinement 2021-02-03 16:03:52 +01:00
Rafał Mikrut
2c2004b316
Change progress dialog to progress window (#229) 2021-01-25 18:23:42 +01:00
Rafał Mikrut
b8049efe62
Remove checking for ico in similar images (#227) 2021-01-25 11:32:10 +01:00
Rafał Mikrut
49ddc041ee
Add about dialog (#226) 2021-01-24 12:01:02 +01:00
Rafał Mikrut
052590d246 Update README and app metadata 2021-01-23 20:22:05 +01:00
Mek101
c46df07b11
Added the packages required to build the cli version on void linux to the README (#225)
Added the packages required to build the cli version on void linux to the README
2021-01-23 20:21:13 +01:00
Rafał Mikrut
bb7bf12354 Release 2.3.2 2021-01-21 20:52:43 +01:00