mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
fix: unwrapping issues with os.Is* functions (#10949)
reduces 3 stat calls, reducing the overall startup time significantly.
This commit is contained in:
@@ -538,11 +538,11 @@ func TestFSRemoveMeta(t *testing.T) {
|
||||
t.Fatalf("Unable to remove file, %s", err)
|
||||
}
|
||||
|
||||
if _, err := os.Stat((filePath)); !os.IsNotExist(err) {
|
||||
if _, err := os.Stat((filePath)); !osIsNotExist(err) {
|
||||
t.Fatalf("`%s` file found though it should have been deleted.", filePath)
|
||||
}
|
||||
|
||||
if _, err := os.Stat((path.Dir(filePath))); !os.IsNotExist(err) {
|
||||
if _, err := os.Stat((path.Dir(filePath))); !osIsNotExist(err) {
|
||||
t.Fatalf("`%s` parent directory found though it should have been deleted.", filePath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user