MCPcopy Create free account
hub / github.com/dropbox/dbxcli / cleanDropboxPath

Function cleanDropboxPath

cmd/dropbox_path.go:25–31  ·  view source on GitHub ↗

Dropbox API paths are slash-separated regardless of the local OS. Use package path for Dropbox paths and filepath only for local filesystem paths.

(p string)

Source from the content-addressed store, hash-verified

23// Dropbox API paths are slash-separated regardless of the local OS. Use package
24// path for Dropbox paths and filepath only for local filesystem paths.
25func cleanDropboxPath(p string) string {
26 p = path.Clean(p)
27 if p == "/" {
28 return ""
29 }
30 return p
31}
32
33func relocationDestination(source, destination string, destinationIsFolder bool) string {
34 if destinationIsFolder {

Callers 2

validatePathFunction · 0.85
sameDropboxPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected