lib/model: Refactor out scanning method from rwfolder.Serve loop
This commit is contained in:
committed by
Jakob Borg
parent
8044522691
commit
66f480519b
11
test/util.go
11
test/util.go
@@ -14,6 +14,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math/rand"
|
||||
"os"
|
||||
@@ -544,3 +545,13 @@ func startInstance(t *testing.T, i int) *rc.Process {
|
||||
p.AwaitStartup()
|
||||
return p
|
||||
}
|
||||
|
||||
func symlinksSupported() bool {
|
||||
tmp, err := ioutil.TempDir("", "symlink-test")
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
err = os.Symlink("tmp", filepath.Join(tmp, "link"))
|
||||
return err == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user