From 750ce4cc2bf06b9a115a93f2c3c4344f361b82dd Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Tue, 16 Feb 2021 21:06:54 -0500 Subject: [PATCH] print all the perms --- lightning-persister/src/util.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lightning-persister/src/util.rs b/lightning-persister/src/util.rs index 79b11bb67..1de34055b 100644 --- a/lightning-persister/src/util.rs +++ b/lightning-persister/src/util.rs @@ -44,10 +44,13 @@ pub(crate) fn write_to_file(path: String, filename: String, da println!("VMW: created dir"); println!("VMW: entries in dir:"); + let mut dir_perms = fs::metadata(path.clone()).unwrap().permissions(); + println!("VMW: dir perms: {:?}", dir_perms); let dir = PathBuf::from(path.clone()); for entry in fs::read_dir(dir).unwrap() { let entry = entry.unwrap(); - println!("VMW: entry in dir: {:?}", entry.path()); + let metadata = entry.metadata().unwrap(); + println!("VMW: entry in dir: {:?}, perms in entry: {:?}", entry.path(), metadata.permissions()); } // Do a crazy dance with lots of fsync()s to be overly cautious here... // We never want to end up in a state where we've lost the old data, or end up using the -- 2.39.5