mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
fix: unwrapping issues with os.Is* functions (#10949)
reduces 3 stat calls, reducing the overall startup time significantly.
This commit is contained in:
@@ -235,7 +235,7 @@ func (d *dataUpdateTracker) load(ctx context.Context, drives ...string) {
|
||||
cacheFormatPath := pathJoin(drive, dataUpdateTrackerFilename)
|
||||
f, err := os.Open(cacheFormatPath)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if osIsNotExist(err) {
|
||||
continue
|
||||
}
|
||||
logger.LogIf(ctx, err)
|
||||
@@ -300,7 +300,7 @@ func (d *dataUpdateTracker) startSaver(ctx context.Context, interval time.Durati
|
||||
cacheFormatPath := pathJoin(drive, dataUpdateTrackerFilename)
|
||||
err := ioutil.WriteFile(cacheFormatPath, buf.Bytes(), os.ModePerm)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if osIsNotExist(err) {
|
||||
continue
|
||||
}
|
||||
logger.LogIf(ctx, err)
|
||||
|
||||
Reference in New Issue
Block a user