MCPcopy
hub / github.com/syncthing/syncthing / fileToUriPath

Function fileToUriPath

internal/db/sqlite/basedb.go:193–201  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

191}
192
193func fileToUriPath(path string) string {
194 path = filepath.ToSlash(path)
195 if (build.IsWindows && len(path) >= 2 && path[1] == ':') ||
196 (strings.HasPrefix(path, "//") && !strings.HasPrefix(path, "///")) {
197 // Add an extra leading slash for Windows drive letter or UNC path
198 path = "/" + path
199 }
200 return path
201}
202
203func (s *baseDB) Close() error {
204 s.updateLock.Lock()

Callers 1

openBaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected