diff --git a/storage/remote/wal_watcher.go b/storage/remote/wal_watcher.go index c399c0bace..17cd3b236a 100644 --- a/storage/remote/wal_watcher.go +++ b/storage/remote/wal_watcher.go @@ -526,7 +526,8 @@ func (w *WALWatcher) readCheckpoint(checkpointDir string) error { func checkpointNum(dir string) (int, error) { // Checkpoint dir names are in the format checkpoint.000001 - chunks := strings.Split(dir, ".") + // dir may contain a hidden directory, so only check the base directory + chunks := strings.Split(path.Base(dir), ".") if len(chunks) != 2 { return 0, errors.Errorf("invalid checkpoint dir string: %s", dir) }