When using OneDrive on macOS, if you face a synchronization error caused by a DS_Store file, then this post will help you resolve the issue. When it happens, you will see a warning message when you click on the OneDrive icon. It will say — Can’t upload files – View sync problems. When you click on it, it will list all files that it is not able to sync, and if there are .ds_store, then here is how to fix it. It stops syncing partially or fully because of ds_store sync error.
OneDrive displays .ds_store sync error
What is the DS_store file?
These are hidden files used by macOS (proprietary), which keeps a record of attributes or meta-data about the folder in which it resides. It holds data such as the position of icons or the choice of a background image. DS Store is a short form for Desktop Services Store. The Finder application on macOS creates and maintains this every folder. You can compare this with the desktop.ini file used by Windows for a similar purpose.
Coming back to the OneDrive issue, that problem is, for some reason, macOS doesn’t allow it to sync. You get an error saying— A file problem is blocking all upload. An item couldn’t be uploaded to OneDrive.
1] Delete .ds_store files
- Use Command + Spacebar to open spotlight
- Type Terminal and press enter to open it when it shows up
- Now use the following command to delete all the ds_store files in OneDrive folder.
find ~/OneDrivePath/ -name ".DS_Store" -depth -exec rm {} \;
If you cannot find the exact path, use this method to open terminal directly in OneDrive folder
- Type OneDrive in the Spotlight
- Press Enter when it appears.
- Right-click on the OneDrive folder, and choose open terminal at that folder
- Now execute the command
find -name ".DS_Store" -depth -exec rm {} \;
It will delete all the DS_STORE files, and the Sync will resume back. Honestly, OneDrive should be blocking the ds_store file in the first place to avoid the OneDrive sync error.
2] Block .ds_store from syncing
Now the drawback of the above method is that you need to run it every time you face this problem. While general consumers do not have the option, Business users can block a particular file type from being uploaded. The choice is available OneeDrive Global.
- Open the OneDrive admin center, and click Sync in the left pane.
- Select the Block syncing of specific file types checkbox.
- Type the file name extensions you want to block. In our case, it should be .ds_store
- Save and Sync
OneDrive usually blocks invalid file types and folders so it doesn’t get into Stuck on “Sync pending” error. The following names aren’t allowed for files or folders: .lock, CON, PRN, AUX, NUL, COM0 – COM9, LPT0 – LPT9, _vti_, desktop.ini, any filename starting with ~$. Similarly characters like ” * : < > ? / \ | ~ ” # % & * : < > ? / \ { | } are also not allowed.
I hope the guide was easy to follow and you were able to resolve the OneDrive .ds_store sync error.