Use UniqueId for file URLs
This commit is contained in:
parent
7dc106a090
commit
f7e46d5033
|
@ -263,7 +263,7 @@ func (c *Client) updateFile(update *client.UpdateFile) {
|
||||||
|
|
||||||
err := os.Symlink(
|
err := os.Symlink(
|
||||||
update.File.Local.Path,
|
update.File.Local.Path,
|
||||||
c.formatFilePath(c.content.Path, update.File.Remote.Id, filepath.Ext(update.File.Local.Path)),
|
c.formatFilePath(c.content.Path, update.File.Remote.UniqueId, filepath.Ext(update.File.Local.Path)),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
linkErr := err.(*os.LinkError)
|
linkErr := err.(*os.LinkError)
|
||||||
|
|
|
@ -344,7 +344,7 @@ func (c *Client) formatContent(file *client.File, filename string) string {
|
||||||
"%s (%v kbytes) | %s",
|
"%s (%v kbytes) | %s",
|
||||||
filename,
|
filename,
|
||||||
file.Size/1024,
|
file.Size/1024,
|
||||||
c.formatFilePath(c.content.Link, file.Remote.Id, filepath.Ext(file.Local.Path)),
|
c.formatFilePath(c.content.Link, file.Remote.UniqueId, filepath.Ext(file.Local.Path)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue