X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=main.go;h=49f36a5de2e69e63ae58357c05a6070beeb177fe;hb=0805255ee01103c500f2aae8845850b3dae6a0b6;hp=6594bdb8dbb33b242c89a8a1961b8ff330ac86f9;hpb=2c9ae6a5a27ae2f2e23495c613e7a53aed8e786c;p=src%2Fxds%2Fxds-server.git diff --git a/main.go b/main.go index 6594bdb..49f36a5 100644 --- a/main.go +++ b/main.go @@ -132,16 +132,17 @@ func xdsApp(cliCtx *cli.Context) error { if err != nil { return cli.NewExitError(err, 2) } - ctx.Log.Infof("Syncthing started (PID %d)", ctx.SThgCmd.Process.Pid) + fmt.Printf("Syncthing started (PID %d)\n", ctx.SThgCmd.Process.Pid) ctx.Log.Infof("Starting Syncthing-inotify...") ctx.SThgInotCmd, err = ctx.SThg.StartInotify() if err != nil { return cli.NewExitError(err, 2) } - ctx.Log.Infof("Syncthing-inotify started (PID %d)", ctx.SThgInotCmd.Process.Pid) + fmt.Printf("Syncthing-inotify started (PID %d)\n", ctx.SThgInotCmd.Process.Pid) // Establish connection with local Syncthing (retry if connection fail) + fmt.Printf("Establishing connection with Syncthing...\n") time.Sleep(2 * time.Second) retry := 10 err = nil @@ -182,7 +183,7 @@ func xdsApp(cliCtx *cli.Context) error { relativePath = stFld.RawPath } - newFld := xdsconfig.NewFolderConfig(stFld.ID, stFld.Label, ctx.Config.ShareRootDir, strings.Trim(relativePath, "/"), defaultSdk) + newFld := xdsconfig.NewFolderConfig(stFld.ID, stFld.Label, ctx.Config.ShareRootDir, strings.TrimRight(relativePath, "/"), defaultSdk) ctx.Config.Folders = ctx.Config.Folders.Update(xdsconfig.FoldersConfig{newFld}) }