diff --git a/samples/cachingfs/caching_fs_test.go b/samples/cachingfs/caching_fs_test.go index ee78f43..48e0e70 100644 --- a/samples/cachingfs/caching_fs_test.go +++ b/samples/cachingfs/caching_fs_test.go @@ -63,6 +63,11 @@ func (t *CachingFSTest) setUp( } func (t *CachingFSTest) TearDown() { + // Was the file system mounted? + if t.mfs == nil { + return + } + // Unmount the file system. Try again on "resource busy" errors. delay := 10 * time.Millisecond for {