Commit 5aa4372f authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb/fs1: Report URL with file:// schema included

In ZODB/go when there is no schema in zurl, open automatically prepends
file:// . However filename itself could contain ":" and so generally
speaking it is incorrect to return URL without file:// schema prepended
to file name.

Another reason to always use fully-constructed URLs with schema, is
interoperability with ZODB/py - there zodburi, when given zurl without
schema, does not make any assumption that it is of file:// kind and
rejects opening such URIs.
parent d904eb10
...@@ -135,7 +135,7 @@ func (fs *FileStorage) LastOid(_ context.Context) (zodb.Oid, error) { ...@@ -135,7 +135,7 @@ func (fs *FileStorage) LastOid(_ context.Context) (zodb.Oid, error) {
} }
func (fs *FileStorage) URL() string { func (fs *FileStorage) URL() string {
return fs.file.Name() return "file://" + fs.file.Name()
} }
// freelist(DataHeader) // freelist(DataHeader)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment