Skip to content

Commit

Permalink
Merge pull request #172 from jufemaiz/bugfix/171/file-does-not-exist
Browse files Browse the repository at this point in the history
migrate.go to resolve #171
  • Loading branch information
rubenv authored Apr 29, 2020
2 parents 531fb8a + 011dc47 commit ae26b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ func findMigrations(dir http.FileSystem) ([]*Migration, error) {
}

func migrationFromFile(dir http.FileSystem, info os.FileInfo) (*Migration, error) {
file, err := dir.Open(info.Name())
path := fmt.Sprintf("/%s", strings.TrimPrefix(info.Name(), "/"))
file, err := dir.Open(path)
if err != nil {
return nil, fmt.Errorf("Error while opening %s: %s", info.Name(), err)
}
Expand Down

0 comments on commit ae26b21

Please sign in to comment.