From 00a4f03f936e797a78ec5f21f99a72126b6e9dfa Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sat, 1 Aug 2020 18:49:47 +0200 Subject: [PATCH] tar: Fix decimal/octal mix up at file permissions This kind of bugs could be a great candidate for a new clippy lint (non-octal literals used for std functions expecting permission bits.) --- src/bin/tar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/tar.rs b/src/bin/tar.rs index 2d99844..2e5966d 100644 --- a/src/bin/tar.rs +++ b/src/bin/tar.rs @@ -100,7 +100,7 @@ fn extract_inner(ar: &mut Archive, verbose: bool, strip: usize) -> R .write(true) .truncate(true) .create(true) - .mode(entry.header().mode().unwrap_or(644)) + .mode(entry.header().mode().unwrap_or(0o644)) .open(&path)? }; copy(&mut entry, &mut file)?; -- GitLab