repochecker: use a temporary directory to import files

This commit is contained in:
nemunaire 2019-11-25 16:22:40 +01:00
parent 56053f3350
commit 11a66346e7
1 changed files with 11 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path"
@ -80,6 +81,16 @@ func main() {
regenImporter = true
}
var err error
// Create temporary directory for storing FILES/ content
fic.FilesDir, err = ioutil.TempDir("", "fic-repochecker.")
if err != nil {
}
defer os.RemoveAll(fic.FilesDir)
if sync.GlobalImporter != nil {
log.Println("Using", sync.GlobalImporter.Kind())