Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dust for openSUSE:Factory checked in at 2026-11-25 18:02:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dust (Old) and /work/SRC/openSUSE:Factory/.dust.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dust" Wed Nov 25 18:02:33 2026 rev:16 rq:1400568 version:1.2.8 Changes: -------- --- /work/SRC/openSUSE:Factory/dust/dust.changes 2026-11-09 16:08:51.929426402 +0100 +++ /work/SRC/openSUSE:Factory/.dust.new.1340718/dust.changes 2026-11-25 18:02:35.948061179 +0100 @@ -1,0 +2,15 @@ +Wed Nov 25 12:23:12 UTC 2026 - Michael Vetter <[email protected]> + +- Update to version 1.2.8: + * version: increment version + * deps: cargo update + * fix: reject invalid regexes in --ignore-all-in-file + * Prevent panic when --ignore-all-in-file fails to read + * chore: remove redundant homepage + * Fix -x / --limit-filesystem on Windows + * fix: don't panic on non-UTF-8 names in json output + * fix(config): reject min-size values that overflow + * fix: only-dir with duplicate top level names + * test: only-dir with duplicate top level names + +------------------------------------------------------------------- Old: ---- dust-1.2.7.obscpio New: ---- dust-1.2.8.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dust.spec ++++++ --- /var/tmp/diff_new_pack.ELuP8y/_old 2026-11-25 18:02:38.153154795 +0100 +++ /var/tmp/diff_new_pack.ELuP8y/_new 2026-11-25 18:02:38.154154837 +0100 @@ -17,7 +17,7 @@ Name: dust -Version: 1.2.7 +Version: 1.2.8 Release: 0 Summary: A more intuitive version of du Group: Productivity/File utilities ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ELuP8y/_old 2026-11-25 18:02:38.257159210 +0100 +++ /var/tmp/diff_new_pack.ELuP8y/_new 2026-11-25 18:02:38.268159677 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/bootandy/dust</param> <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">v1.2.7</param> + <param name="revision">v1.2.8</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> <param name="exclude">ci/*</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ELuP8y/_old 2026-11-25 18:02:38.327162182 +0100 +++ /var/tmp/diff_new_pack.ELuP8y/_new 2026-11-25 18:02:38.341162776 +0100 @@ -3,6 +3,6 @@ <param name="url">git://github.com/bootandy/dust</param> <param name="changesrevision">c2546684c63bcd0ed99cfee22c5e855c7b825502</param></service><service name="tar_scm"> <param name="url">https://github.com/bootandy/dust</param> - <param name="changesrevision">079c55266917387e416e0f871c97c06da52df12d</param></service></servicedata> + <param name="changesrevision">09f8f43d21d5706baa62375c966fbe33c29a38f1</param></service></servicedata> (No newline at EOF) ++++++ dust-1.2.7.obscpio -> dust-1.2.8.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/Cargo.lock new/dust-1.2.8/Cargo.lock --- old/dust-1.2.7/Cargo.lock 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/Cargo.lock 2026-11-25 11:06:37.000000000 +0100 @@ -108,9 +108,9 @@ [[package]] name = "bstr" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" +checksum = "a680398c10c7bc0488067c4612226ea905a85f607134b69f3068d505d58c4214" dependencies = [ "memchr", "regex-automata", @@ -119,15 +119,15 @@ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "cc" -version = "1.10.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0" +checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69" dependencies = [ "find-msvc-tools", "shlex", @@ -160,9 +160,9 @@ [[package]] name = "clap" -version = "4.6.7" +version = "4.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +checksum = "50066ca966813ca8957ee15361752f19424a8ff620dbe9c8993d9f99d99b04b3" dependencies = [ "clap_builder", "clap_derive", @@ -170,9 +170,9 @@ [[package]] name = "clap_builder" -version = "4.6.7" +version = "4.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +checksum = "a0ed97c96ef4efb3cc84e09fa388df4463e7cc3224ec38d7b1d9e45749333590" dependencies = [ "anstream", "anstyle", @@ -182,36 +182,36 @@ [[package]] name = "clap_complete" -version = "4.6.11" +version = "4.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f" +checksum = "6a35200383f20018d41c14d1ab19c1727c697f544492143f7d93aa39f0187848" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.6.7" +version = "4.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7" dependencies = [ "heck", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "clap_lex" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" +checksum = "e0921b3876b3a1df8a1c9f912e7f94342458022c2e84288015893d83c4d62a79" [[package]] name = "clap_mangen" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "211d617eaa4b735c96c9e0228fcbdb5120ef623f2b8cb67ffb84c3e02dbc28a4" +checksum = "a3b6a8907b1723f211693e27b9af5899b86a9512ef5b08bd4a15b6bceb30da6d" dependencies = [ "clap", "roff", @@ -267,9 +267,9 @@ [[package]] name = "ctrlc" -version = "3.5.2" +version = "3.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" +checksum = "11247e6c4f83c2b15748f4873805483deaa2bbc855e773817c07a9f987f55c62" dependencies = [ "dispatch2", "nix", @@ -296,7 +296,7 @@ [[package]] name = "du-dust" -version = "1.2.7" +version = "1.2.8" dependencies = [ "assert_cmd", "chrono", @@ -315,7 +315,6 @@ "serde", "serde_json", "stfu8", - "sysinfo", "tempfile", "terminal_size", "thousands", @@ -331,9 +330,9 @@ [[package]] name = "errno" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" dependencies = [ "libc", "windows-sys", @@ -433,15 +432,15 @@ [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] name = "js-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ "cfg-if", "futures-util", @@ -462,9 +461,9 @@ [[package]] name = "log" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "lscolors" @@ -484,9 +483,9 @@ [[package]] name = "nix" -version = "0.31.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +checksum = "77730ed34f01f4990cb2ea67fec715ecebc6fab9a6396cf83c5529b13f581bdc" dependencies = [ "bitflags", "cfg-if", @@ -495,15 +494,6 @@ ] [[package]] -name = "ntapi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" -dependencies = [ - "winapi", -] - -[[package]] name = "nu-ansi-term" version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -531,54 +521,12 @@ ] [[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", - "dispatch2", - "objc2", -] - -[[package]] name = "objc2-encode" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" [[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags", - "objc2", -] - -[[package]] -name = "objc2-io-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" -dependencies = [ - "libc", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-open-directory" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb82bed227edf5201dfedf072bba4015a33d3d4a98519837295a90f0a23f676d" -dependencies = [ - "objc2", - "objc2-core-foundation", - "objc2-foundation", -] - -[[package]] name = "once_cell" version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -592,9 +540,9 @@ [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752" [[package]] name = "portable-atomic" @@ -675,9 +623,9 @@ [[package]] name = "regex" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" dependencies = [ "aho-corasick", "memchr", @@ -687,9 +635,9 @@ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" dependencies = [ "aho-corasick", "memchr", @@ -698,9 +646,9 @@ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" [[package]] name = "roff" @@ -760,7 +708,7 @@ dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -813,9 +761,9 @@ [[package]] name = "syn" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -823,21 +771,6 @@ ] [[package]] -name = "sysinfo" -version = "0.39.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "objc2-io-kit", - "objc2-open-directory", - "windows", -] - -[[package]] name = "tempfile" version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -909,9 +842,9 @@ [[package]] name = "unicode-width" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557" [[package]] name = "utf8parse" @@ -930,12 +863,11 @@ [[package]] name = "wasm-bindgen" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -943,9 +875,9 @@ [[package]] name = "wasm-bindgen-macro" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -953,22 +885,22 @@ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] @@ -1005,27 +937,6 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" -dependencies = [ - "windows-collections", - "windows-core", - "windows-future", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" -dependencies = [ - "windows-core", -] - -[[package]] name = "windows-core" version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1039,17 +950,6 @@ ] [[package]] -name = "windows-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" -dependencies = [ - "windows-core", - "windows-link", - "windows-threading", -] - -[[package]] name = "windows-implement" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1078,16 +978,6 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "windows-numerics" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" -dependencies = [ - "windows-core", - "windows-link", -] - -[[package]] name = "windows-result" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1113,15 +1003,6 @@ dependencies = [ "windows-link", ] - -[[package]] -name = "windows-threading" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" -dependencies = [ - "windows-link", -] [[package]] name = "zmij" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/Cargo.toml new/dust-1.2.8/Cargo.toml --- old/dust-1.2.7/Cargo.toml 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/Cargo.toml 2026-11-25 11:06:37.000000000 +0100 @@ -1,13 +1,12 @@ [package] name = "du-dust" description = "A more intuitive version of du" -version = "1.2.7" +version = "1.2.8" authors = ["bootandy <[email protected]>", "nebkor <[email protected]>"] edition = "2024" readme = "README.md" documentation = "https://github.com/bootandy/dust" -homepage = "https://github.com/bootandy/dust" repository = "https://github.com/bootandy/dust" keywords = ["du", "command-line", "disk", "disk-usage"] @@ -39,7 +38,6 @@ config-file = "0.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -sysinfo = "0.39" ctrlc = "3" chrono = "0.4" rustc-hash = "2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/man-page/dust.1 new/dust-1.2.8/man-page/dust.1 --- old/dust-1.2.7/man-page/dust.1 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/man-page/dust.1 2026-11-25 11:06:37.000000000 +0100 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH Dust 1 "Dust 1.2.7" +.TH Dust 1 "Dust 1.2.8" .SH NAME Dust \- Like du but more intuitive .SH SYNOPSIS @@ -173,4 +173,4 @@ [\fIPATH\fR] Input files or directories .SH VERSION -v1.2.7 +v1.2.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/config.rs new/dust-1.2.8/src/config.rs --- old/dust-1.2.7/src/config.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/config.rs 2026-11-25 11:06:37.000000000 +0100 @@ -251,25 +251,25 @@ if let Some(cap) = re.captures(input) { let (_, [digits, letters]) = cap.extract(); - // Failure to parse should be impossible due to regex match - let digits_as_usize: Option<usize> = digits.parse().ok(); - - match digits_as_usize { - Some(parsed_digits) => { - let number_format = get_number_format(&letters.to_lowercase()); - match number_format { - Some((multiple, _)) => Some(parsed_digits * (multiple as usize)), - None => { - if letters.is_empty() { - Some(parsed_digits) - } else { - eprintln!("Ignoring invalid min-size: {input}"); - None - } - } + let parsed = digits.parse::<usize>().ok().and_then(|parsed_digits| { + if letters.is_empty() { + Some(parsed_digits) + } else { + match get_number_format(&letters.to_lowercase()) { + Some((multiple, _)) => usize::try_from(multiple) + .ok() + .and_then(|multiple| parsed_digits.checked_mul(multiple)), + None => None, } } - None => None, + }); + + match parsed { + Some(min_size) => Some(min_size), + None => { + eprintln!("Ignoring invalid min-size: {input}"); + None + } } } else { eprintln!("Ignoring invalid min-size: {input}"); @@ -375,6 +375,16 @@ assert_eq!(convert_min_size("1.5M"), None); assert_eq!(convert_min_size("1 M"), None); assert_eq!(convert_min_size("-5"), None); + + // Values too large to represent must not panic or silently wrap: + // they are rejected like any other invalid value. + // ("99999999T" overflows the u64 multiplication on 64-bit targets, and + // its multiplier does not fit a 32-bit usize; "18446744073709551616" + // is 2^64, which fits no usize.) + assert_eq!(convert_min_size("99999999T"), None); + assert_eq!(convert_min_size("18446744073709551616"), None); + // The largest representable value is accepted on any target. + assert_eq!(convert_min_size(&usize::MAX.to_string()), Some(usize::MAX)); } #[test] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/dir_walker.rs new/dust-1.2.8/src/dir_walker.rs --- old/dust-1.2.7/src/dir_walker.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/dir_walker.rs 2026-11-25 11:06:37.000000000 +0100 @@ -267,6 +267,19 @@ return true; } + // The cheap Windows metadata path has no volume serial. Only a followed + // link (symlink, junction, mounted folder) can lead to another volume, so + // look the serial up for those. + #[cfg(target_family = "windows")] + if !walk_data.allowed_filesystems.is_empty() + && walk_data.follow_links + && file_type.is_symlink() + && crate::platform::get_volume_serial(path) + .is_some_and(|dev| !walk_data.allowed_filesystems.contains(&dev)) + { + return true; + } + let has_time_filter = walk_data.filter_accessed_time.is_some() || walk_data.filter_modified_time.is_some() || walk_data.filter_changed_time.is_some(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/display_node.rs new/dust-1.2.8/src/display_node.rs --- old/dust-1.2.7/src/display_node.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/display_node.rs 2026-11-25 11:06:37.000000000 +0100 @@ -51,8 +51,28 @@ .with(|output_type| human_readable_number(self.size, output_type.borrow().as_str())); let mut state = serializer.serialize_struct("DisplayNode", 2)?; state.serialize_field("size", &(readable_size))?; - state.serialize_field("name", &self.name)?; + state.serialize_field("name", &self.name.to_string_lossy())?; state.serialize_field("children", &self.children)?; state.end() } } + +#[cfg(test)] +mod tests { + use super::*; + + #[cfg(unix)] + #[test] + fn test_serialize_non_utf8_name() { + use std::ffi::OsStr; + use std::os::unix::ffi::OsStrExt; + + let node = DisplayNode { + size: 0, + name: PathBuf::from(OsStr::from_bytes(b"bad\xffname")), + children: vec![], + }; + let json = serde_json::to_string(&node).unwrap(); + assert!(json.contains("bad\u{FFFD}name")); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/filter.rs new/dust-1.2.8/src/filter.rs --- old/dust-1.2.7/src/filter.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/filter.rs 2026-11-25 11:06:37.000000000 +0100 @@ -122,11 +122,9 @@ None => !display_data.using_a_filter || c.name.is_file() || c.size > 0, }) .filter(|c| { - if display_data.only_dir { - c.name.is_dir() - } else { - true - } + // Top level nodes may have been renamed by + // handle_duplicate_top_level_names, so their name is not a real path + !display_data.only_dir || c.depth == 0 || c.name.is_dir() }), ); heap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/main.rs new/dust-1.2.8/src/main.rs --- old/dust-1.2.7/src/main.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/main.rs 2026-11-25 11:06:37.000000000 +0100 @@ -19,7 +19,6 @@ use display::InitialDisplayData; use filter::AggregateData; use progress::PIndicator; -use regex::Error; use std::collections::HashSet; use std::env; use std::fs::{read, read_to_string}; @@ -183,18 +182,18 @@ None => vec![], }; - let ignore_from_file_result = match options.ignore_all_in_file { + let ignore_from_file_lines = match options.ignore_all_in_file { Some(ref val) => read_to_string(val) - .unwrap() + .unwrap_or_else(|err| { + eprintln!("Failed to read file {val}: {err}"); + process::exit(1); + }) .lines() - .map(Regex::new) - .collect::<Vec<Result<Regex, Error>>>(), + .map(String::from) + .collect::<Vec<String>>(), None => vec![], }; - let ignore_from_file = ignore_from_file_result - .into_iter() - .filter_map(|x| x.ok()) - .collect::<Vec<Regex>>(); + let ignore_from_file = get_regex_value(Some(&ignore_from_file_lines)); let invert_filter_regexs = invert_filter_regexs .into_iter() @@ -347,7 +346,9 @@ wrapped.replace(output_format); } }); - writeln!(out, "{}", serde_json::to_string(&tree).unwrap()) + serde_json::to_writer(&mut out, &tree) + .map_err(io::Error::from) + .and_then(|()| writeln!(out)) } else { let idd = InitialDisplayData { short_paths: !config.get_full_paths(&options), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/platform.rs new/dust-1.2.8/src/platform.rs --- old/dust-1.2.7/src/platform.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/platform.rs 2026-11-25 11:06:37.000000000 +0100 @@ -80,6 +80,24 @@ ((i128::from(filetime) - UNIX_EPOCH_FILETIME).div_euclid(TICKS_PER_SECOND)) as i64 } +/// Volume serial number of `path`, following links. `get_metadata` usually +/// skips opening a handle, so its tuple carries no device on Windows. +#[cfg(target_family = "windows")] +pub fn get_volume_serial(path: &Path) -> Option<u64> { + use std::os::windows::fs::OpenOptionsExt; + const FILE_READ_ATTRIBUTES: u32 = 0x0080; + // Needed to open a handle to a directory. + const FILE_FLAG_BACKUP_SEMANTICS: u32 = 0x0200_0000; + + let file = fs::OpenOptions::new() + .access_mode(FILE_READ_ATTRIBUTES) + .custom_flags(FILE_FLAG_BACKUP_SEMANTICS) + .open(path) + .ok()?; + let info = winapi_util::file::information(winapi_util::Handle::from_file(file)).ok()?; + Some(info.volume_serial_number()) +} + #[cfg(target_family = "windows")] pub fn get_metadata<P: AsRef<Path>>( path: P, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/src/utils.rs new/dust-1.2.8/src/utils.rs --- old/dust-1.2.7/src/utils.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/src/utils.rs 2026-11-25 11:06:37.000000000 +0100 @@ -1,4 +1,3 @@ -use platform::get_metadata; use std::collections::HashSet; use std::path::{Path, PathBuf}; @@ -34,6 +33,15 @@ top_level_names } +#[cfg(target_family = "windows")] +pub fn get_filesystem_devices<P: AsRef<Path>>(paths: &[P], _follow_links: bool) -> HashSet<u64> { + paths + .iter() + .filter_map(|p| platform::get_volume_serial(p.as_ref())) + .collect() +} + +#[cfg(not(target_family = "windows"))] pub fn get_filesystem_devices<P: AsRef<Path>>(paths: &[P], follow_links: bool) -> HashSet<u64> { use std::fs; // Gets the device ids for the filesystems which are used by the argument paths @@ -49,7 +57,7 @@ } else { false }; - match get_metadata(p, false, follow_links) { + match platform::get_metadata(p, false, follow_links) { Some((_size, Some((_id, dev)), _time)) => Some(dev), _ => None, } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dust-1.2.7/tests/test_flags.rs new/dust-1.2.8/tests/test_flags.rs --- old/dust-1.2.7/tests/test_flags.rs 2026-11-01 19:44:20.000000000 +0100 +++ new/dust-1.2.8/tests/test_flags.rs 2026-11-25 11:06:37.000000000 +0100 @@ -77,6 +77,22 @@ ); } +#[cfg(unix)] +#[test] +fn test_json_output_with_non_utf8_file_name() { + use std::os::unix::ffi::OsStrExt; + + let temp_dir = tempfile::tempdir().unwrap(); + let bad_name = temp_dir.path().join(OsStr::from_bytes(b"bad\xffname")); + if std::fs::write(bad_name, b"x").is_err() { + return; + } + + let output = build_command(vec![OsStr::new("-j"), temp_dir.path().as_os_str()]); + serde_json::from_str::<serde_json::Value>(&output).unwrap(); + assert!(output.contains("bad\u{FFFD}name")); +} + // We can at least test the file names are there #[test] pub fn test_basic_output() { @@ -159,6 +175,25 @@ } #[test] +pub fn test_ignore_all_in_file_rejects_invalid_regex() { + let temp_dir = tempfile::tempdir().unwrap(); + let ignore_file = temp_dir.path().join("ignore"); + std::fs::write(&ignore_file, "[secret\n^other$\n").unwrap(); + + let mut cmd = cargo_bin_cmd!("dust"); + cmd.arg("-P") + .arg("-I") + .arg(&ignore_file) + .arg("tests/test_dir_hidden_entries/"); + let finished = cmd.output().unwrap(); + + assert_eq!(finished.status.code(), Some(1)); + let stderr = str::from_utf8(&finished.stderr).unwrap(); + assert!(stderr.contains("Ignoring bad value for regex"), "{stderr}"); + assert!(stderr.contains("[secret"), "{stderr}"); +} + +#[test] pub fn test_files_from_flag_file() { let output = build_command(vec![ "--files-from", @@ -449,3 +484,16 @@ assert!(output.contains("dup_name")); assert!(!output.contains("test_dir_matching")); } + +#[test] +pub fn test_handle_duplicate_names_only_dir() { + // Duplicate top level names are renamed to e.g. "dup_name(dave)", which is + // not a real path, so --only-dir must not check those names on disk + let output = build_command(vec![ + "-D", + "tests/test_dir_matching/dave/dup_name", + "tests/test_dir_matching/andy/dup_name", + ]); + assert!(output.contains("andy"), "{output}"); + assert!(output.contains("dave"), "{output}"); +} ++++++ dust.obsinfo ++++++ --- /var/tmp/diff_new_pack.ELuP8y/_old 2026-11-25 18:02:38.697177891 +0100 +++ /var/tmp/diff_new_pack.ELuP8y/_new 2026-11-25 18:02:38.702178103 +0100 @@ -1,5 +1,5 @@ name: dust -version: 1.2.7 -mtime: 1793558660 -commit: 079c55266917387e416e0f871c97c06da52df12d +version: 1.2.8 +mtime: 1795601197 +commit: 09f8f43d21d5706baa62375c966fbe33c29a38f1 ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/dust/vendor.tar.zst /work/SRC/openSUSE:Factory/.dust.new.1340718/vendor.tar.zst differ: char 7, line 1
