Merge branch 'release/1.4.0' into develop
authorChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 12:46:47 +0000 (14:46 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 22 Aug 2019 12:46:47 +0000 (14:46 +0200)
1  2 
server/lib/schedulers/videos-redundancy-scheduler.ts
server/middlewares/validators/users.ts

index d9018e6060fa8ee5c9c469eb241ed4f1e76daa50,cd70fd85161273cdb3acbada1022d79e643e9831..21fe51156e995d782be6d370d97c4188ff18e930
@@@ -200,9 -185,9 +200,9 @@@ export class VideosRedundancyScheduler 
      const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT)
  
      const destPath = join(CONFIG.STORAGE.REDUNDANCY_DIR, video.getVideoFilename(file))
-     await move(tmpPath, destPath)
+     await move(tmpPath, destPath, { overwrite: true })
  
 -    const createdModel = await VideoRedundancyModel.create({
 +    const createdModel: MVideoRedundancyFileVideo = await VideoRedundancyModel.create({
        expiresOn: this.buildNewExpiration(redundancy.minLifetime),
        url: getVideoCacheFileActivityPubUrl(file),
        fileUrl: video.getVideoRedundancyUrl(file, WEBSERVER.URL),