chore: save extracted files using base64 names
This commit is contained in:
parent
98dde15d59
commit
c4b0fc46f3
|
@ -17,7 +17,7 @@ sqpack = { git = "https://git.anna.lgbt/ascclemens/sqpack-rs", features = ["read
|
|||
|
||||
[dev-dependencies]
|
||||
criterion = "0.4"
|
||||
hex = "0.4"
|
||||
base64 = "0.13"
|
||||
sha3 = "0.10"
|
||||
tempfile = "3"
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ pub fn main() {
|
|||
std::io::copy(&mut temp, &mut sha).unwrap();
|
||||
temp.seek(SeekFrom::Start(0)).unwrap();
|
||||
let hash = sha.finalize_reset();
|
||||
let hash = hex::encode(&*hash);
|
||||
let hash = base64::encode_config(&*hash, base64::URL_SAFE_NO_PAD);
|
||||
let new = !hashes.contains_key(&hash);
|
||||
let saved = SavedFile {
|
||||
game_path: file.file.full_path.clone(),
|
||||
|
|
Loading…
Reference in New Issue