chore: use rm instead of rmdir

This commit is contained in:
Nicolas Meienberger 2025-12-21 19:49:14 +01:00
parent 9e5655e201
commit 6e4398820a

View file

@ -40,7 +40,7 @@ export class CleanupDanglingMountsJob extends Job {
if (!matchingVolume) {
const fullPath = path.join(VOLUME_MOUNT_BASE, dir);
logger.info(`Found dangling mount directory at ${fullPath}, attempting to remove...`);
await fs.rmdir(fullPath, { recursive: true }).catch((err) => {
await fs.rm(fullPath, { recursive: true, force: true }).catch((err) => {
logger.warn(`Failed to remove dangling mount directory ${fullPath}: ${toMessage(err)}`);
});
}