mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Test: Fix check file bug
This commit is contained in:
parent
030b94e717
commit
27d4080084
1 changed files with 3 additions and 1 deletions
4
trunk/3rdparty/srs-bench/srs/util_test.go
vendored
4
trunk/3rdparty/srs-bench/srs/util_test.go
vendored
|
@ -84,9 +84,11 @@ func prepareTest() error {
|
|||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
nfilename := path.Join("../", filename)
|
||||
if fi, r0 := os.Stat(nfilename); r0 != nil && !fi.IsDir() {
|
||||
f2, err := os.Open(nfilename)
|
||||
if err != nil {
|
||||
return filename, errors.Wrapf(err, "No video file at %v or %v", filename, nfilename)
|
||||
}
|
||||
defer f2.Close()
|
||||
|
||||
return nfilename, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue