Rebrand client cli (#320)

This commit is contained in:
Maycon Santos
2022-05-22 18:53:47 +02:00
committed by GitHub
parent 32611e1131
commit 5cbfa4bb9e
24 changed files with 442 additions and 208 deletions

View File

@@ -1,9 +1,11 @@
package cmd
import (
"errors"
"flag"
"fmt"
"io"
"io/fs"
"io/ioutil"
"net"
"net/http"
@@ -178,10 +180,10 @@ func cpDir(src string, dst string) error {
}
func migrateToNetbird(oldPath, newPath string) bool {
_, old := os.Stat(oldPath)
_, new := os.Stat(newPath)
_, errOld := os.Stat(oldPath)
_, errNew := os.Stat(newPath)
if os.IsNotExist(old) || os.IsExist(new) {
if errors.Is(errOld, fs.ErrNotExist) || errNew == nil {
return false
}