|
@@ -4,7 +4,7 @@ import (
|
|
"fmt"
|
|
"fmt"
|
|
"mime"
|
|
"mime"
|
|
"os"
|
|
"os"
|
|
- "path"
|
|
|
|
|
|
+ "path/filepath"
|
|
"strings"
|
|
"strings"
|
|
|
|
|
|
log "github.com/Sirupsen/logrus"
|
|
log "github.com/Sirupsen/logrus"
|
|
@@ -55,7 +55,7 @@ func MatchesContentType(contentType, expectedType string) bool {
|
|
// LoadOrCreateTrustKey attempts to load the libtrust key at the given path,
|
|
// LoadOrCreateTrustKey attempts to load the libtrust key at the given path,
|
|
// otherwise generates a new one
|
|
// otherwise generates a new one
|
|
func LoadOrCreateTrustKey(trustKeyPath string) (libtrust.PrivateKey, error) {
|
|
func LoadOrCreateTrustKey(trustKeyPath string) (libtrust.PrivateKey, error) {
|
|
- err := os.MkdirAll(path.Dir(trustKeyPath), 0700)
|
|
|
|
|
|
+ err := os.MkdirAll(filepath.Dir(trustKeyPath), 0700)
|
|
if err != nil {
|
|
if err != nil {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|