Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

czkawka not finding dupes in trivial example on Mac OS #1084

Closed
alexhunsley opened this issue Oct 12, 2023 · 3 comments
Closed

czkawka not finding dupes in trivial example on Mac OS #1084

alexhunsley opened this issue Oct 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@alexhunsley
Copy link

alexhunsley commented Oct 12, 2023

Desktop

  • Czkawka version: 6.0.0 gui
  • OS version: Mac OS 13.5.2
  • hardware: MacBook Pro 2021 (apple silicon)
  • compile and run method: as per instructions, having previously done brew install rustup

Bug Description

To reproduce:

on terminal, cd somewhere suitable and run this script to create a few dupe files:

#!/bin/bash

rm -rf czkawka_test_files_ah

TEST_DIR=czkawka_test_files_ah

mkdir -p ${TEST_DIR}/ref_dir

cd ${TEST_DIR}

printf "FILE 1\nhello world\n" > ref_dir/file1.txt
printf "FILE 2\ncats\ndogs\n" > ref_dir/file2.txt
printf "FILE 3" > ref_dir/file3.txt

cp -a ref_dir other_dir

mkdir other_dir/empty_dir

Then run the czkawka UI. Add just one directory: czkawka_test_files_ah, select duplicate file search. No duplicates are found when you search, regardless of Hash (for all hash kinds), Name, Size, Name+Size. I tried with cache enabled and cached disabled (and ensured any cache files were deleted).

I confirmed that those files really are duplicates, as expected, by using jdupes:

❯ jdupes -rMS .
Scanning: 8 files, 4 items (in 1 specified)
19 bytes each:
./czkawka_test_files_ah/other_dir/file1.txt
./czkawka_test_files_ah/ref_dir/file1.txt

6 bytes each:
./czkawka_test_files_ah/other_dir/file3.txt
./czkawka_test_files_ah/ref_dir/file3.txt

17 bytes each:
./czkawka_test_files_ah/other_dir/file2.txt
./czkawka_test_files_ah/ref_dir/file2.txt


3 duplicate files (in 3 sets), occupying 42 bytes
@alexhunsley alexhunsley added the bug Something isn't working label Oct 12, 2023
@qarmin
Copy link
Owner

qarmin commented Oct 12, 2023

Are you sure that you properly set minimum file size?

czkawka_cli dup -d /home/rafal/test/czkawka_test_files_ah/

not found any files, but

czkawka_cli dup -d /home/rafal/test/czkawka_test_files_ah/ -m 1

found this

Found 6 duplicated files in 3 groups with same content which took 42 B:
Size - 19 B (19) - 2 files 
/home/rafal/test/czkawka_test_files_ah/ref_dir/file1.txt
/home/rafal/test/czkawka_test_files_ah/other_dir/file1.txt
----

Size - 17 B (17) - 2 files 
/home/rafal/test/czkawka_test_files_ah/ref_dir/file2.txt
/home/rafal/test/czkawka_test_files_ah/other_dir/file2.txt
----

Size - 6 B (6) - 2 files 
/home/rafal/test/czkawka_test_files_ah/ref_dir/file3.txt
/home/rafal/test/czkawka_test_files_ah/other_dir/file3.txt
----

-------------------------------MESSAGES--------------------------------
Loaded from cache ⁨0⁩ entries
Saved to file ⁨6⁩ cache entries
Loaded from cache ⁨2583⁩ entries
Saved to file ⁨2583⁩ cache entries
---------------------------END OF MESSAGES-----------------------------

In #1083 I removed limitation that forced to use only absolute directories(this was caused by gui needs) - this also can be problem here.

@alexhunsley
Copy link
Author

Ah thanks, I didn't know about that minimum file size settings, will try it!

@alexhunsley
Copy link
Author

Yup that was the issue, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants