Compare commits

..

No commits in common. "master" and "v1.3.1-stable" have entirely different histories.

3 changed files with 1 additions and 10 deletions

View File

@ -1,12 +1,9 @@
package main package main
func correctPath(path string) string { func correctPath(path string) string {
if path[len(path)-1:] == `/` || path[len(path)-1:] == `\` { if path[len(path)-1:] == `/` || path[len(path)-1:] == `\` {
// Case: E.g. remote dir = /myfiles/
return path[:len(path)-1] return path[:len(path)-1]
} else { } else {
// Case: E.g. remote dir = /myfiles
return path return path
} }
} }

View File

@ -16,7 +16,7 @@ import (
func main() { func main() {
// Show the current version: // Show the current version:
log.Println(`Sync v1.3.2`) log.Println(`Sync v1.3.1`)
// Allow Go to use all CPUs: // Allow Go to use all CPUs:
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

View File

@ -7,12 +7,6 @@ import (
func normalisePath(base, path string) string { func normalisePath(base, path string) string {
result := strings.Replace(path, base, ``, 1) result := strings.Replace(path, base, ``, 1)
// Ensure that the path starts with a slash:
if len(result) > 1 && result[0:1] != `/` {
result = filepath.Join(`/`, result)
}
result = filepath.ToSlash(result) result = filepath.ToSlash(result)
return strings.ToLower(result) return strings.ToLower(result)
} }