mirror of
https://github.com/bootandy/dust.git
synced 2025-12-16 01:20:52 -08:00
Compare commits
2 Commits
other2
...
v0.8.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a48c5db61 | ||
|
|
a18f90ca0f |
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -148,7 +148,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "du-dust"
|
name = "du-dust"
|
||||||
version = "0.8.0"
|
version = "0.8.1-alpha.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "du-dust"
|
name = "du-dust"
|
||||||
description = "A more intuitive version of du"
|
description = "A more intuitive version of du"
|
||||||
version = "0.8.0"
|
version = "0.8.1-alpha.2"
|
||||||
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
|
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# tag a commit and push (increment version in Cargo.toml first):
|
# tag a commit and push (increment version in Cargo.toml first):
|
||||||
# git tag v0.4.5
|
# git tag v0.4.5
|
||||||
# git push origin v0.4.5
|
# git push origin v0.4.5
|
||||||
|
# pre release notation: "0.8.1-alpha.1"
|
||||||
|
|
||||||
# cargo publish to put it in crates.io
|
# cargo publish to put it in crates.io
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ pub fn get_metadata(d: &Path, _use_apparent_size: bool) -> Option<(u64, Option<(
|
|||||||
use std::os::windows::fs::MetadataExt;
|
use std::os::windows::fs::MetadataExt;
|
||||||
match d.metadata() {
|
match d.metadata() {
|
||||||
Ok(ref md) => {
|
Ok(ref md) => {
|
||||||
const FILE_ATTRIBUTE_ARCHIVE: u32 = 0x20u32;
|
|
||||||
const FILE_ATTRIBUTE_READONLY: u32 = 0x1u32;
|
const FILE_ATTRIBUTE_READONLY: u32 = 0x1u32;
|
||||||
const FILE_ATTRIBUTE_HIDDEN: u32 = 0x2u32;
|
const FILE_ATTRIBUTE_HIDDEN: u32 = 0x2u32;
|
||||||
const FILE_ATTRIBUTE_SYSTEM: u32 = 0x4u32;
|
const FILE_ATTRIBUTE_SYSTEM: u32 = 0x4u32;
|
||||||
@@ -114,8 +113,7 @@ pub fn get_metadata(d: &Path, _use_apparent_size: bool) -> Option<(u64, Option<(
|
|||||||
|
|
||||||
let attr_filtered = md.file_attributes()
|
let attr_filtered = md.file_attributes()
|
||||||
& !(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM);
|
& !(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM);
|
||||||
if attr_filtered == FILE_ATTRIBUTE_ARCHIVE
|
if attr_filtered == FILE_ATTRIBUTE_DIRECTORY
|
||||||
|| attr_filtered == FILE_ATTRIBUTE_DIRECTORY
|
|
||||||
|| md.file_attributes() == FILE_ATTRIBUTE_NORMAL
|
|| md.file_attributes() == FILE_ATTRIBUTE_NORMAL
|
||||||
{
|
{
|
||||||
Some((md.len(), None))
|
Some((md.len(), None))
|
||||||
|
|||||||
Reference in New Issue
Block a user