From fd462659cd8ca31ceaf0687ef2915ff0314087ad Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 30 Jul 2019 11:35:05 -0700 Subject: [PATCH] tmp cleaner: only remove files and not directories some apps like rocket.chat create directories in tmp and removing those directories causes problems (for example, uploading) --- src/janitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/janitor.js b/src/janitor.js index eadfd4484..a0369044d 100644 --- a/src/janitor.js +++ b/src/janitor.js @@ -63,7 +63,7 @@ function cleanupTmpVolume(containerInfo, callback) { assert.strictEqual(typeof containerInfo, 'object'); assert.strictEqual(typeof callback, 'function'); - var cmd = 'find /tmp -mtime +10 -exec rm -rf {} +'.split(' '); // 10 days old + var cmd = 'find /tmp -type f -mtime +10 -exec rm -rf {} +'.split(' '); // 10 day old files debug('cleanupTmpVolume %j', containerInfo.Names);