abraunegg/onedrive

Bug: Adding a SharePoint Library link to Business Account does not work correctly

Opened this issue · 1 comments

Describe the bug

When adding a SharePoint Library Link via the 'Add to my ....' to a OneDrive Business Account, whilst the link is used, there are application errors generated + data is not put in the right location locally.

  • Places first folder in incorrect local location on --resync
  • When using 'sync_list' generates DB insertion errors

Raising this for self tracking of issue in case anyone bumps into this

Bug found when working on #3040

Operating System Details

N/A

Client Installation Method

From Source

OneDrive Account Type

Business | Office365

What is your OneDrive Application Version

N/A

What is your OneDrive Application Configuration

N/A

What is your 'curl' version

N/A

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

N/A

What are all your local file system partition types

N/A

How do you use 'onedrive'

N/A

Steps to reproduce the behaviour

N/A

Complete Verbose Log Output

N/A

Screenshots

N/A

Other Log Information or Details

N/A

Additional context

N/A

To anyone watching this repo - please can you test the PR below.

First install all the require platform dependencies to build the client on your respective platforms. Please read https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements and then follow correctly for your platform.

Once this is done, to clone the PR to resolve your issue, you can use a script like the following:

#!/bin/bash

PR=3051

rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}

# Configure and Build
./configure --enable-debug --enable-notifications; make clean; make;
./onedrive --version

This script will create a local folder called onedrive-pr3051 with the PR version.

To run the PR, you need to run the client from the PR build directory:

./onedrive <any other options needed>

To install the PR, you will need to perform sudo make install to install the PR version to your system.

When running the PR, your version should be: onedrive v2.5.3-33-gd323e46 or greater.

Expected Result

  1. Shared Folders (Personal & Business) should operate as normal
  2. Shared Folders (Personal & Business) when include|excluded via 'sync_list' should be handled correctly
  3. Shared Folders (a Link to a SharePoint Document Library root) should operate as normal (this is the bug fix)

This PR has a DB Schema Change due to fixing how Shared Folders (all types) is handled, thus, a --resync will automatically happen due to the DB Schema Change.

I have attempted to test this as much as possible, however there are 100% nuances I cannot test, especially with the API differences in Europe.

@nathan-gs , @boblemus

Given your recent issues with OneDrive Personal Shared Folders, please can you test this PR.

@robertschulze

Given your issues in the past with OneDrive Personal Shared Folders, please can you test this PR, as this touches some of the code fixes from #2731

This issue ticket / PR will remain open until feedback has been provided.

This PR needs to be merged before v2.5.4 can be released.