OneDrive - Backup Sync: Documents - Additional check required to prevent duplicate and correct link

Brass Contributor

For build 18362.175+

 

When OneDrive initializes and runs first setup for Backup of Desktop, Documents and Pictures directories, the current setup logic creates a duplicate Documents folder in %USERPROFILE%.

An additional step is required to prevent the duplicate directory, and verify that the symbolic link for %USERPROFILE%\Documents is pointing to %USERPROFILE%\OneDrive\Documents

 

  1. OneDrive Backup setup runs
  2. OneDrive creates Documents link in %USERPROFILE% (Two Documents directories now exist in Explorer)
  3. OneDrive Backup starts moving %USERPROFILE%\Documents to %USERPROFILE%\OneDrive\Documents
  4. %USERPROFILE%\Documents is now empty  (Two Documents directories exist in Explorer)

Additional steps

  1. If %USERPROFILE%\Documents is empty: check step 2
  2. Paths need to be expanded. C:\Users\%USERNAME%\Documents
  3. If C:\Users\%USERNAME%\Documents is empty, Delete C:\Users\%USERNAME%\Documents
  4. Check C:\Users\%USERNAME%\OneDrive\Documents has created symbolic link to C:\Users\%USERNAME%\Documents

If this isn't done, applications writing to the absolute path of C:\Users\%USERNAME%\Documents will not be backed up, and users will have files go missing during an OS Update. The application will not write to C:\Users\%USERNAME%\OneDrive\Documents. It will use the absolute path.

While two directories exist, the symbolic link is bugged, and will not correctly redirect C:\Users\%USERNAME%\Documents to C:\Users\%USERNAME%\OneDrive\Documents

 

 

Please patch OneDrive setup to include these checks

 

 

OneDrive-DirJunction.jpgOneDrive-LS.jpg

OneDrive-Docs.jpg

2 Replies
I would recommend raising a ticket with Microsoft about this issue.

OneDrive support have informed me that they have passed this issue on to the Engineers

 

 

Note:

Just adding another visual example:

Explorer: User Profile Local Path compared to User Profile Cloud Path

CloudPath-LocalPath.jpg