Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From path.Join to filepath.Join #338

Merged
merged 2 commits into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## master / unreleased

* [CHANGE] From path.Join to filepath.Join [#338](https://github.com/grafana/tempo/pull/338)
* [BUGFIX] Frequent errors logged by compactor regarding meta not found [#327](https://github.com/grafana/tempo/pull/327)

## v0.3.0
Expand Down
8 changes: 4 additions & 4 deletions tempodb/backend/diskcache/disk_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"io/ioutil"
"os"
"path"
"path/filepath"
"syscall"
"time"

Expand All @@ -19,7 +19,7 @@ func (r *reader) readOrCacheBloom(ctx context.Context, blockID uuid.UUID, tenant
var skippableError error

k := bloomKey(blockID, tenantID, typeBloom, shardNum)
filename := path.Join(r.cfg.Path, k)
filename := filepath.Join(r.cfg.Path, k)

bytes, err := ioutil.ReadFile(filename)

Expand Down Expand Up @@ -51,7 +51,7 @@ func (r *reader) readOrCacheIndex(ctx context.Context, blockID uuid.UUID, tenant
var skippableError error

k := key(blockID, tenantID, typeIndex)
filename := path.Join(r.cfg.Path, k)
filename := filepath.Join(r.cfg.Path, k)

bytes, err := ioutil.ReadFile(filename)

Expand Down Expand Up @@ -152,7 +152,7 @@ func clean(folder string, allowedMBs int, pruneCount int) (bool, error) {
continue
}

err = os.Remove(path.Join(folder, info.Name()))
err = os.Remove(filepath.Join(folder, info.Name()))
}

return true, err
Expand Down
4 changes: 2 additions & 2 deletions tempodb/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"

"github.com/google/uuid"
Expand Down Expand Up @@ -46,7 +46,7 @@ func New(c *Config) (*WAL, error) {
}

if c.CompletedFilepath == "" {
completedFilepath := path.Join(c.Filepath, completedDir)
completedFilepath := filepath.Join(c.Filepath, completedDir)
err = os.RemoveAll(completedFilepath)
if err != nil {
return nil, err
Expand Down