Skip to content

Commit

Permalink
Oops, don't use windows-specific file size function.
Browse files Browse the repository at this point in the history
Also: Don't fail fast on matrix builds.
  • Loading branch information
NfNitLoop committed Feb 24, 2021
1 parent 0d42555 commit bfcfa1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -18,6 +18,9 @@ jobs:
- ubuntu-18.04
- windows-latest
- macos-latest
# Don't fail fast, if we have a failure on a specific matrix type
# we want to know which ones:
fail-fast: false

runs-on: ${{ matrix.os }}

Expand Down
7 changes: 3 additions & 4 deletions src/tests.rs
@@ -1,5 +1,4 @@
use std::{fs::DirEntry, io, os::windows::prelude::MetadataExt, path::Path};

use std::{fs::DirEntry, io, path::Path};

// TODO: These are equivalent and bs58 seems better. migrate.
// Test that our base58 encoder can encode/decode arbitrary bytes.
Expand Down Expand Up @@ -121,7 +120,7 @@ fn no_ntfs_ads() -> Result<(), failure::Error> {
// I don't see any way in std:: to directly list NTFS data streams, but
// Windows/Rust report file sizes w/o alternate data streams, so I'm
// using this as a proxy for that.
if md.file_size() == 0 {
if md.len() == 0 {
println!("ERROR: 0 byte file: {}", entry.path().to_str().unwrap_or("Unknown file"));
found_files += 1;
}
Expand Down Expand Up @@ -172,4 +171,4 @@ fn walk_files<P: AsRef<Path>>(dir_path: P) -> Result<impl Iterator<Item=io::Resu
});

Ok(iter)
}
}

0 comments on commit bfcfa1e

Please sign in to comment.