mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
added protection against trailing slash
This commit is contained in:
parent
5a68470339
commit
7de69df424
2 changed files with 5 additions and 1 deletions
|
|
@ -243,6 +243,9 @@ func copyFile(src, dest string) error {
|
|||
}
|
||||
|
||||
func Migrate(dataDir, backupPath string) error {
|
||||
if strings.HasSuffix(dataDir, "/") {
|
||||
dataDir = dataDir[:len(dataDir)-1]
|
||||
}
|
||||
err := os.MkdirAll(backupPath, 0777)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
# actually get test coverage for every single package and subpackage
|
||||
# very slow but oh well what are you gonna do, not test things?
|
||||
# note it skips the roaring migrate
|
||||
echo "mode: atomic" > coverage.out
|
||||
for pkg in $(go list all | grep featurebase); do
|
||||
for pkg in $(go list all | grep featurebase | grep -v roaring-migrate); do
|
||||
go test -coverprofile=pkgcoverage.out -covermode=atomic $pkg;
|
||||
tail -n +2 pkgcoverage.out >> coverage.out; done
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue