Forum Discussion
Deleted files/folders reappear as they are synced back online from client OneDrive
Hi Arvi10 - my reply above showing guessing how Dropbox or Google Drive handles deletions may give a hint of the root cause but I can confirm without a shadow of a doubt that the following happens on OneDrive:
1. Logon to a computer where you had OneDrive synchronised but haven't logged onto for a while - say a few months
2. OneDrive will restore deleted folders and files back to the last time you logged on
Fortunately, thank goodness, it doesn't overwrite edited versions or delete anything. You do get the horrible "My file - LAPTOP046.ps1" cropping up where I assume it thinks it's got the latest version (it never has!) but there is a file there with a newer timestamp so it renames its (old) copy with the suffix and restores that. The creation of these files is usually my trigger to go into OneDrive and restore it back in time - a feature designed to Wannacry attacks but used because of this bug.
I suspect, but a lot of guessing, that this is because OneDrive doesn't keep a transaction log kind of structure along side the actual folders and files. Therefore when you logon to an old computer, it has no idea that "Monthly" was deleted on another system many days later and merrily brings it back.
Hence my observation that this is a fundamental flaw in the synchronisation algorithm used by OneDrive which Dropbox and Google Drive don't suffer from. They have a transaction log which they can refer to resolve issues like this.
So the Microsoft programmers need to go back to the drawing board IMO... wearing my developer hat. I am flabbergasted that OneDrive has this fundamental flaw and they intend you to use it for business! Thank goodness that my clients only tend to logon to one computer at once!
So this bug goes something like this:
BEGIN
OneDrive thinks, for reasons unknown, that it has a locally modified copy of a file in a read-only share. Obviously this can't happen as the folder is read-only with deny access! I suspect it happens when a file is changed rapidly on the host OneDrive - as can happen if you're editing a PowerShell script and hitting Ctrl-S often - and OneDrive gets confused over timestamps, thinking it's got a different copy
OneDrive then renames its local copy as XYZ - LAPTOPNNN.ps1 but this then fails to synchronise as it's read-only
END
So two bugs here: the first one that triggers the creation of a sync copy IN A READ-ONLY share (can never happen so should be trapped). The second is creating the XYZ - LAPTOPnnn.ps1 file which then fails to synchronise. And maybe a 3rd in that you are then unable to delete the accidental copy because it's created with DENY accesss
Ho hum!
- Rob NicholsonDec 11, 2018Brass ContributorIt should be easy to fix as the logic would go like this:
BEGIN
For reasons unknown, OneDrive thinks it needs to create a "My doc - LAPTOPnnn.docx" kind of file due to some kind of version clash
Am I trying to create this in read-only share?
Goodness, I can't do that - forget the duplicate then
END