andy.boot
a8d700d530
Merge pull request #66 from bootandy/ab-refactor
...
Refactor code
2020-02-09 14:27:05 +00:00
andy.boot
c408d8887d
Update docs for -X flag.
...
-X flag changed subtly with previous pull request. It now requires a
directory name and doesn't work on substrings.
2020-02-09 14:10:53 +00:00
andy.boot
be2250d241
Refactor: use if let instead of is_some
2020-02-09 14:10:53 +00:00
andy.boot
b6aa1378de
Fix bug for devices and apparent size
...
If apparent_size was set and ignore files on other devices was set then
the latter flat would not work.
Fix this bug
2020-02-09 13:57:08 +00:00
andy.boot
2082141dfc
Add tests for should_ignore_file function
...
function currently has a bug that is highlighted by second test
2020-02-09 13:57:08 +00:00
andy.boot
8a9b5e889d
Refactor path depth calculation
...
Factor out duplicate code,
Add comment explaining why filter is necessary (thanks to rivy)
2020-02-09 13:57:08 +00:00
andy.boot
871b7e90d8
Merge pull request #64 from rivy/rf.path
...
Refactor ~ use Path/PathBuf instead of &str/String
2020-02-09 13:52:11 +00:00
andy.boot
edf300893c
Increment version
2020-02-09 10:08:41 +00:00
Roy Ivy III
a3d8fc00e1
Refactor ~ use AsRef<Path> where possible
2020-02-03 16:56:50 -06:00
Roy Ivy III
9d4531d48b
Refactor ~ use PathBuf instead of String
2020-02-03 16:56:47 -06:00
andy.boot
75e419e7ed
Update README.md
...
Remove section on performance, I can not replicate this and don't want to cause controversy.
v0.4.5.0
2020-02-03 20:54:19 +00:00
andy.boot
4a62fc5726
Update README.md
...
include dutree in alternatives
2020-02-03 20:52:12 +00:00
andy boot
d2b959fdcf
Merge pull request #62 from rivy/add.gha
...
Fix windows compilation and testing
v0.4.41
2020-02-03 20:31:37 +00:00
Roy Ivy III
36ebb1b2b0
refactor ~ strip_trailing_curdirs() -> normalize_path() (a more accurate descriptor)
2020-01-29 18:36:13 -06:00
Roy Ivy III
e126a01096
Tests ~ improve portability of tests for 'Fix ~ improve portability of path manipulation'
2020-01-29 18:36:13 -06:00
Roy Ivy III
7a38a26593
Fix ~ (WinAPI) must use Handle::from_path_any() if target path might be a directory
...
.# [why]
"If you use `from_path()` on a directory, then subsequent queries using that handle will fail."
Instead, use `from_path_any()` which supports opening files or directories.
ref: "Struct winapi_util::Handle" from <https://docs.rs/crate/winapi-util >
2020-01-29 18:36:13 -06:00
Roy Ivy III
1af6e1f757
Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ disable two symlink tests which may not be possible on 'windows''
2020-01-29 18:36:13 -06:00
Roy Ivy III
affafcc5f2
Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ temporarily disable tests which vary by 'windows' hosts'
2020-01-29 18:36:13 -06:00
Roy Ivy III
26ef8c3e59
Tests ~ add test case to 'Fix ~ improve portability of path manipulation'
2020-01-29 18:36:13 -06:00
Roy Ivy III
0898ee6bf0
Maint/CI ~ temporarily disable non-working cargo tarpaulin test coverage
2020-01-29 18:36:13 -06:00
Roy Ivy III
5ac168868e
Tests ~ temporarily disable tests which vary by 'windows' hosts
2020-01-29 18:36:13 -06:00
Roy Ivy III
684994ee11
Tests ~ disable two symlink tests which may not be possible on 'windows'
2020-01-29 18:36:12 -06:00
Roy Ivy III
416ad517fe
Tests ~ fix windows testing
2020-01-29 18:36:12 -06:00
Roy Ivy III
7c34389aea
Fix ~ improve portability of path manipulation
2020-01-29 18:36:12 -06:00
Roy Ivy III
18510130d8
Maint/CI ~ add GitHub-Actions CI (aka GHA)
2020-01-29 18:36:12 -06:00
andy boot
0bf8c914b7
Merge pull request #59 from Celti/exclude-multiple
...
Allow multiple --ignore-directory flags
2020-01-21 23:32:49 +00:00
Celti Burroughs
95888d5f31
Allow multiple --ignore-directory flags
2020-01-21 15:40:04 -07:00
andy boot
5d195e27cb
Merge pull request #61 from lespea/fixWinBreaks
...
Fix get_metadata on windows
2020-01-21 22:06:00 +00:00
Adam Lesperance
0c7b05fec9
Fix get_metadata on windows
...
The MetadataExt functions are nightly-only right now so we need to call
the windows api ourselves to get the device number. The winapi_util
package has a nice wrapper to do this for us.
The get_device function doesn't appear to be used anywhere so I removed
it.
2020-01-21 00:06:41 -06:00
andy boot
bc895879e6
Update README.md
2020-01-20 23:36:59 +00:00
andy boot
31f01c061a
Update README.md
2020-01-19 09:55:51 +00:00
andy boot
17894e723c
Merge pull request #55 from bootandy/ab-neaten
...
Ab fix clippy warnings, increment version number
2020-01-19 09:51:33 +00:00
andy boot
6141ddddea
Merge pull request #54 from bootandy/ab-ignore-dir
...
Add option to ignore directories
2020-01-19 09:35:04 +00:00
andy.boot
352c0f7d90
Increment version number
v0.4.4
2020-01-19 09:32:49 +00:00
andy.boot
842a8ec673
Clean up clippy warnings
2020-01-19 09:32:35 +00:00
andy.boot
d97edba041
Add option to ignore directories
...
https://github.com/bootandy/dust/issues/46
Add -X flag used to ignore any file or directory that matches the
provided substring.
This means that -X e will ignore any file or directory with an 'e' in
it.
2020-01-19 09:23:13 +00:00
andy boot
f64e0094f1
Merge pull request #53 from bootandy/single_cpu
...
Fix dust for single core machines
2020-01-18 23:06:28 +00:00
andy.boot
3d2477e554
Allow dust to run on single core machines
...
Force dust to use 2 threads if there is only 1 cpu
JWalk breaks if it tries to run on a single cpu
https://github.com/jessegrosjean/jwalk/issues/15
This is a hack because I can't figure out how to fix JWalk.
This code and the num_cpu crate can be removed when the bug is fixed
Also I have conflated cpus with cores while describing this issue. It is
very difficult to test as I don't have a single core machine.
2020-01-18 22:04:08 +00:00
andy.boot
350d695f7c
Add num_cpus as Cargo dependency
...
Will be used to detect single core computers which crash Jwalk
2020-01-18 21:57:11 +00:00
andy boot
f8b8b8a788
Merge pull request #51 from bootandy/ab-exclude
...
Support excluding filesystems with -x
2020-01-18 21:54:41 +00:00
andy.boot
b9c27f9838
get_filesystem returns Result instead of option
...
Removes unwrap and returns a Result instead of panicing if an invalid
path is given.
Previously if the flag: '-x' was provided with an argument of an
invalid directory the code would crash here
2020-01-16 23:50:56 +00:00
andy.boot
5541df6a73
Refactor code
...
Reduce complexity of examine_dir.
No logic changes
2020-01-15 20:10:33 +00:00
andy.boot
bdc3d404ef
Support excluding filesystems with -x
...
https://github.com/bootandy/dust/issues/50
Add optional -x flag to limit search to the current filesystem.
Add (untested) support for windows for the equivalent of inode and
device.
2020-01-15 19:51:16 +00:00
andy boot
f395a7d768
Merge pull request #49 from bootandy/ab-upgrade
...
Upgrade libraries. Fix assert_cli
v0.4.3
2019-12-30 22:07:04 +00:00
andy.boot
a36eec6cae
Increment version number
2019-12-30 21:40:30 +00:00
Adam Lesperance
38938e005e
Fix colors on windows
...
* Initialize ansi_term if we're on windows
* Silence build warning on non-unix targets
* Update ansi-term which has windows specific fixes (and assert_cli while I'm at it)
2019-12-30 21:36:49 +00:00
andy.boot
da61b15715
Upgrade libraries. Fix assert_cli
...
New assert_cli library requires we cast the param passed to 'is()' as
it can no longer cast implicitly. I am guessing this is because it is
due to confusion between whether to cast to u8 or str
2019-12-30 21:23:53 +00:00
andy boot
0b22d0a977
Merge pull request #47 from bootandy/ab-bug-fix
...
Ab bug fix
2019-12-30 21:12:37 +00:00
andy.boot
356d14ac0f
Hack fix around JWalk behaviour.
...
Jwalk returns '/' as a child of the current node which breaks things.
https://github.com/jessegrosjean/jwalk/issues/13
2019-12-23 15:51:12 +00:00
andy.boot
311bc45388
Verify that '/' is parent of everything
...
Bug could occur when run with '/' as it wasn't considered the parent of
'/usr' due to having the same number of '/'s in the name
2019-12-23 15:50:01 +00:00