Skip to content

Commit 564fc64

Browse files
Merge pull request #69 from ipfs/kevina/go1.8.3
Bump go version to 1.8.3 on Travis CI and fix related breakage.
2 parents 6b568b7 + 24addb6 commit 564fc64

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os:
88
language: go
99

1010
go:
11-
- 1.5.2
11+
- 1.8.3
1212

1313
env:
1414
- TEST_VERBOSE=1

ipfs-4-to-5/migration/migration.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ func (m Migration) Apply(opts migrate.Options) error {
5353
basepath := filepath.Join(opts.Path, "blocks")
5454
ffspath := filepath.Join(opts.Path, "blocks-v4")
5555
if err := os.Rename(basepath, ffspath); err != nil {
56-
if os.IsNotExist(err) {
57-
fi, err2 := os.Stat(ffspath)
58-
if err2 == nil && fi.IsDir() {
56+
// the error returned is unreliable so instead check that the
57+
// old path doesn't exist and the new one does and is a directory
58+
if _, err2 := os.Stat(basepath); os.IsNotExist(err2) {
59+
if fi, err2 := os.Stat(ffspath); err2 == nil && fi.IsDir() {
5960
log.Log("... blocks already renamed to blocks-v4, continuing")
6061
err = nil
6162
}

0 commit comments

Comments
 (0)