repochecker: use a temporary directory to import files
This commit is contained in:
parent
56053f3350
commit
11a66346e7
1 changed files with 11 additions and 0 deletions
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -80,6 +81,16 @@ func main() {
|
||||||
regenImporter = true
|
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 {
|
if sync.GlobalImporter != nil {
|
||||||
log.Println("Using", sync.GlobalImporter.Kind())
|
log.Println("Using", sync.GlobalImporter.Kind())
|
||||||
|
|
||||||
|
|
Reference in a new issue