Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Nick Craig-Wood
65889395d5 onedrive: fix onedrive personal direct share link
This adapts to changes in the share URL provided by onedrive personal.

Before it looked like this

    https://1drv.ms/t/XXX

Now it sometimes looks like this

    https://1drv.ms/v/c/XXX/YYY

Fixes #7898
2024-06-12 11:46:16 +01:00

View file

@ -1933,7 +1933,9 @@ func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration,
switch f.driveType {
case driveTypePersonal:
// Method: https://stackoverflow.com/questions/37951114/direct-download-link-to-onedrive-file
if len(segments) != 5 {
// https://1drv.ms/t/XXX
// https://1drv.ms/v/c/XXX/YYY
if len(segments) < 5 {
fs.Logf(f, cnvFailMsg)
return shareURL, nil
}