diff options
| author | chrislu <chris.lu@gmail.com> | 2025-10-26 09:42:40 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-10-26 09:42:40 -0700 |
| commit | 1a124d1fd8b193b8b10f2f88ec08a3848269fd5b (patch) | |
| tree | 0024f101c975ee85e98d6fad9050e9cea53d50c9 /weed/storage/disk_location.go | |
| parent | 31f905ce2a2a3cd2643930a34cd786abe6315473 (diff) | |
| download | seaweedfs-1a124d1fd8b193b8b10f2f88ec08a3848269fd5b.tar.xz seaweedfs-1a124d1fd8b193b8b10f2f88ec08a3848269fd5b.zip | |
address comments
* Performance: Avoid Double os.Stat() Call
* Platform Compatibility: Use filepath.Join
Diffstat (limited to 'weed/storage/disk_location.go')
| -rw-r--r-- | weed/storage/disk_location.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index 3da922f5b..e8c1d10e4 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -153,7 +153,7 @@ func (l *DiskLocation) loadExistingVolume(dirEntry os.DirEntry, needleMapKind Ne // skip if ec volumes exists, but validate EC files first if skipIfEcVolumesExists { - ecxFilePath := l.IdxDirectory + "/" + volumeName + ".ecx" + ecxFilePath := filepath.Join(l.IdxDirectory, volumeName+".ecx") if util.FileExists(ecxFilePath) { // Check if EC volume is valid by verifying shard count if !l.validateEcVolume(collection, vid) { |
