rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.18k stars 270 forks source link

Fix Windows filepath separator bug #195

Closed fredericobormann closed 3 years ago

fredericobormann commented 3 years ago

The implementation uses the FileSystem of the http package which uses "/" as a separator in paths regardless of the operating system. However, the filepath.join-method creates a path using the system-specific separator ("\" for Windows, see documentation) which results in a http: invalid character in file path-error in the migrationFromFile-method. Using the path.join-method instead resolves this issue.

rubenv commented 3 years ago

Makes sense! Thanks!