diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-06-08 08:49:57 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-06-08 08:49:57 -0700 |
| commit | bb3e86fbd5b2e0ec17b496a3ca3904cd63ce0521 (patch) | |
| tree | 876b5428d52e2ef3aab5a728cc0ec21355e3a81d /weed/util/file_util.go | |
| parent | bdbe5ddbe9cd46ec7a931407e0bc33a2f8d0c9b1 (diff) | |
| download | seaweedfs-bb3e86fbd5b2e0ec17b496a3ca3904cd63ce0521.tar.xz seaweedfs-bb3e86fbd5b2e0ec17b496a3ca3904cd63ce0521.zip | |
auto create non-existing cache directory
fix https://github.com/chrislusf/seaweedfs/issues/1350
Diffstat (limited to 'weed/util/file_util.go')
| -rw-r--r-- | weed/util/file_util.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/util/file_util.go b/weed/util/file_util.go index bef9f7cd6..ff725830b 100644 --- a/weed/util/file_util.go +++ b/weed/util/file_util.go @@ -49,6 +49,10 @@ func CheckFile(filename string) (exists, canRead, canWrite bool, modTime time.Ti exists = false return } + if err != nil { + glog.Errorf("check %s: %v", filename, err) + return + } if fi.Mode()&0400 != 0 { canRead = true } |
