1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

link: use "off" value for unset expiry

This commit is contained in:
Nick Craig-Wood
2021-04-06 16:21:32 +01:00
parent 3d3ff61f74
commit 9393225a1d
2 changed files with 2 additions and 3 deletions

View File

@@ -1429,7 +1429,7 @@ func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration,
Password: f.opt.LinkPassword,
}
if expire < fs.Duration(time.Hour*24*365*100) {
if expire < fs.DurationOff {
expiry := time.Now().Add(time.Duration(expire))
share.Expiry = &expiry
}