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

Fixes #2789 #2790

Merged
merged 2 commits into from
Jun 3, 2017
Merged
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
10 changes: 5 additions & 5 deletions physical/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math"
"os"
"path/filepath"
pkgPath "path"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -420,7 +420,7 @@ func (d *DynamoDBBackend) LockWith(key, value string) (Lock, error) {
}
return &DynamoDBLock{
backend: d,
key: filepath.Join(filepath.Dir(key), DynamoDBLockPrefix+filepath.Base(key)),
key: pkgPath.Join(pkgPath.Dir(key), DynamoDBLockPrefix+pkgPath.Base(key)),
value: value,
identity: identity,
recovery: d.recovery,
Expand Down Expand Up @@ -724,7 +724,7 @@ func ensureTableExists(client *dynamodb.DynamoDB, table string, readCapacity, wr
// its last component.
func recordPathForVaultKey(key string) string {
if strings.Contains(key, "/") {
return filepath.Dir(key)
return pkgPath.Dir(key)
}
return DynamoDBEmptyPath
}
Expand All @@ -734,7 +734,7 @@ func recordPathForVaultKey(key string) string {
// property. This path equals the the vault key's
// last component.
func recordKeyForVaultKey(key string) string {
return filepath.Base(key)
return pkgPath.Base(key)
}

// vaultKey returns the vault key for a given record
Expand All @@ -745,7 +745,7 @@ func vaultKey(record *DynamoDBRecord) string {
if path == "" {
return record.Key
}
return filepath.Join(record.Path, record.Key)
return pkgPath.Join(record.Path, record.Key)
}

// escapeEmptyPath is used to escape the root key's path
Expand Down