Increase refresh interval to 2 days
[oweals/peertube.git] / server / initializers / installer.ts
index 349d7afb7a7f967798b744034836d1425e082870..cd2c942fd1dc2851136989782f72b0421138004c 100644 (file)
@@ -24,7 +24,7 @@ async function installApplication () {
         }),
 
       // Directories
-      removeCacheDirectories()
+      removeCacheAndTmpDirectories()
         .then(() => createDirectoriesIfNotExist())
     ])
   } catch (err) {
@@ -41,7 +41,7 @@ export {
 
 // ---------------------------------------------------------------------------
 
-function removeCacheDirectories () {
+function removeCacheAndTmpDirectories () {
   const cacheDirectories = Object.keys(CACHE)
     .map(k => CACHE[k].DIRECTORY)
 
@@ -53,6 +53,8 @@ function removeCacheDirectories () {
     tasks.push(remove(dir))
   }
 
+  tasks.push(remove(CONFIG.STORAGE.TMP_DIR))
+
   return Promise.all(tasks)
 }