fix: always canonicalize paths, remove temporary debug statements

This commit is contained in:
Matteo Settenvini 2025-02-21 00:16:06 +01:00
parent 355c7e6403
commit 0657a55b3d
Signed by: matteo
GPG Key ID: 1C1B12600D81DE05
2 changed files with 2 additions and 7 deletions

View File

@ -82,14 +82,14 @@ impl Runner {
async fn paths_producer(tasks: &mut JoinSet<Result<(), Error>>) -> mpsc::Receiver<Decision> {
let (input_tx, input_rx) = mpsc::channel(CHANNEL_SIZE);
let walker = WalkDir::new(".").follow_links(false);
let walker = WalkDir::new(".").follow_links(false).same_file_system(true);
tasks.spawn(async move {
for entry in walker {
match entry {
Ok(e) if !Self::is_dir(&e) => {
input_tx
.send(Decision {
path: e.into_path(),
path: e.into_path().strip_prefix(".")?.to_path_buf(),
action: Action::Undecided,
})
.await?;

View File

@ -77,7 +77,6 @@ impl Cleaner for DsoCleaner {
if decision.action == Action::Keep {
let ino = nix::sys::stat::lstat(&decision.path)?.st_ino;
inodes_to_keep.insert(ino);
dbg!(&decision.path, ino);
}
// If something was marked as "keep" or "remove" before,
@ -111,10 +110,6 @@ impl Cleaner for DsoCleaner {
};
for path in paths {
if path.display().to_string().contains("libjsonrpccpp-server") {
dbg!(inode, &path, action);
}
output.send(Decision { path, action }).await?;
}
}