mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 15:11:56 +01:00
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
This commit is contained in:
parent
d068e0b1a9
commit
65889395d5
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user