83 Commits

Author SHA1 Message Date
Łukasz Langa
3f5eb8a0ab
Remove the test directory after successful test run 2023-08-02 13:49:12 +02:00
Łukasz Langa
955b370815
Test requirements now live in pyproject.toml 2023-08-02 13:46:28 +02:00
Łukasz Langa
ad04f72da6
Move freeze_support to the main file, remove unused bin/bitrot 2023-08-02 13:38:31 +02:00
Łukasz Langa
0e9391d087
Fix typo in README 2023-08-02 13:08:15 +02:00
Łukasz Langa
87e15913a5
Move to pyproject.toml, drop Python 2 v1.0.1 2023-08-02 13:00:30 +02:00
Łukasz Langa
929fb39782
Move tests to pytest 2023-08-02 12:17:02 +02:00
Łukasz Langa
7f9a2e2efc
Remove unused 'wait' import 2020-06-18 20:06:53 +02:00
p1r473
6168723f5b
Unused variable deletion (#42) 2020-06-18 20:05:08 +02:00
Łukasz Langa
67e7b8c904
v1.0.0 1.0.0 2020-05-18 00:15:24 +02:00
Łukasz Langa
0dc3390b7f
Use a process pool to calculate hashes and perform stat()
Fixes #23
2020-05-17 22:55:35 +02:00
Łukasz Langa
104e07b66b
Fix trailing whitespace in the test 2020-05-17 22:54:27 +02:00
Łukasz Langa
52677d2b5d
Optimization: don't SELECT the path twice if it's not there 2020-05-17 21:58:30 +02:00
Łukasz Langa
45ab4501ee
Make handle_unknown_path more readable 2020-05-17 21:50:09 +02:00
Łukasz Langa
8ee84344e8
Simplify normalization and Unicode handling 2020-05-17 21:18:48 +02:00
Łukasz Langa
7608b56ea6
Remove trailing whitespace 2020-05-17 21:17:19 +02:00
Łukasz Langa
8e9e37094d
Claim 3.7 and 3.8 compatibility, can't be bothered to check 3.6 2020-05-17 20:19:10 +02:00
Łukasz Langa
9af31192c2
Make tests more robust and readable 2020-05-17 20:17:56 +02:00
Łukasz Langa
c73646d2e1
Update ACKS 2020-05-17 18:47:23 +02:00
Łukasz Langa
8ec9ea9629
Use NFKD instead of NFKC because that's what macOS uses by default 2020-05-17 18:33:23 +02:00
Łukasz Langa
c27c259282
Add MIT license to make it explicit 2020-05-17 18:28:17 +02:00
Stan Senotrusov
74f043b3ca
Normalize unicode paths in the database (#37)
* Normalize unicode paths in the database to enable use of the same database across different platforms

* Check if unicode normalization should be applied without regexp
2020-05-17 18:27:05 +02:00
Reid Williams
4ea0a57e0a
Add and remove unnecessary / needed decodes (#38)
* remove unecessary decode

* add needed decode

Co-authored-by: Reid Williams <reid@computable.io>
2020-05-17 17:07:47 +02:00
Zhuoyun Wei
6d82ff93b1 Fix a typo in README (#35) 2018-02-26 10:13:56 -08:00
p1r473
a043402114 Vacuuming (#34)
Added database vacuuming to shrink DB size on hard drive of old hashes that went missing
2017-06-13 13:34:44 -07:00
liloman
a8e52626ef Swap sqlite cursor with dictionary and set data structures (#24)
1. Use 2 new data structures:
-paths (set) contains all the files in the actual filesystem
-hashes (dictionary) substitute the sqlite query with dict[hash] = set(db paths)

2. Minimal unitary tests created with bats (bash script)

See https://github.com/ambv/bitrot/issues/23 for details.
2017-03-03 10:16:46 -08:00
Lukasz Langa
6b4a1fd46a Typo in README 2016-11-01 12:06:01 -07:00
Lukasz Langa
58aa762e5c 0.9.2, updated README and benchmarks 0.9.2 2016-11-01 12:02:34 -07:00
Łukasz Langa
7cf1577be7 Merge pull request #20 from benshep/patch-1
Corrected assumed 'utf-8' encoding
2016-11-01 11:24:18 -07:00
benshep
53b1a12301 Corrected assumed 'utf-8' encoding
Was failing on my machine - traced it to line 189 using a hard-coded 'utf-8' encoding. Everywhere else uses FSENCODING (which on my machine is 'mbcs'), so replaced it here as well.
2016-10-31 14:03:59 +00:00
Łukasz Langa
d192fa0175 Fixed -s 0.9.1 2016-10-29 19:27:18 -07:00
Łukasz Langa
5e66b772d2 More robust filename encoding during stdout handling 2016-10-29 19:12:33 -07:00
Łukasz Langa
8c871b1319 Merge pull request #18 from vain/fix-encoding-warning
Print full path when file name decoding fails
2016-10-29 15:04:46 -07:00
Łukasz Langa
8cfdf0cfc1 Merge pull request #19 from vain/increase-verbosity
Increase verbosity
2016-10-29 15:02:31 -07:00
Peter Hofmann
313347dd61 Show warnings about unreadable files even with verbosity == 0
I had a semi-corrupt encfs (which I detected, thanks to this tool!). A
file was only partially readable. Somewhere in the middle, an IOError
occured. Essentially, this is a corrupt file system -- which this tool
is meant to help detect --, so this class of errors shouldn't be
suppressed by "-q".
2016-09-21 17:45:29 +02:00
Peter Hofmann
4e3c840eb0 Show warnings about un-stat-able files even with verbosity == 0
I get that this is some kind of a grey area due to the underlying race
condition (files vanishing after they have been scanned). However, if we
can't stat() a file it can have many different causes -- the file being
vanished is just one of them. Since this tool is meant to help detect
bit rot and corrupt file systems, I'd rather be informed about
un-stat-able files.
2016-09-21 17:45:24 +02:00
Peter Hofmann
4bd293f024 Print full path when file name decoding fails 2016-09-19 18:16:55 +02:00
Lukasz Langa
5ed89d8b1a [0.9.0] Python 3 compat, --quiet obeyed for bitrot.db checksum checks 0.9.0 2016-08-09 14:51:57 -07:00
Łukasz Langa
bfb73acc70 Merge pull request #17 from philipbl/error_files
Make bad files available in exception
2016-07-14 10:40:48 -07:00
Philip Lundrigan
49912e9c9c Add Phil to authors 2016-07-14 08:28:20 -06:00
Philip Lundrigan
6405beaeba Fix if condition 2016-07-14 08:28:05 -06:00
Philip Lundrigan
18bf67317e Make error files available in exception 2016-07-13 12:58:20 -06:00
Łukasz Langa
e4efbc290c bitrot 0.8.0, fsencoding and self-integrity check 2016-05-02 17:52:20 -07:00
Łukasz Langa
a09f0b0ad6 Bump version after fixing #13 2015-11-02 16:27:00 -08:00
Łukasz Langa
2fc483e6b4 Update README.rst 2015-11-02 16:26:21 -08:00
Łukasz Langa
539c277bd8 Open file in binary mode for SHA1 computation
Fixes #13.
2015-11-02 16:23:18 -08:00
Łukasz Langa
0f4ebfa4fa Fix a RST typo. 2015-06-22 18:10:49 -07:00
Łukasz Langa
13b0067ac8 [0.7.0] Multiple bug fixes and refactors 0.7.0 2015-06-22 18:08:26 -07:00
Łukasz Langa
08c6d436bf Merge pull request #7 from msloth/hotfix-missing-dbase-at-test
catch missing database file when running 'test' instead of crashing
2014-12-30 16:37:33 -08:00
Łukasz Langa
a319333fdb Merge pull request #8 from ganwell/master
Fixed possible unique constraint exception
2014-10-03 00:22:24 -07:00
Jean-Louis Fuchs
4d1ca47777 Fixed possible unique constraint exception
When renaming a file its hash can't be used in the WHERE
condition in the UPDATE statement since there _can_ be more
than one file having the same hash and not all of them are
renamed just the one not existing anymore. So we need to use
the old path (now non-existent) to specify the record to
update.

To make the code more clear I also added setting the hash
explicitly in the UPDATE statement.
2014-09-10 15:48:33 +02:00