How to Fix OneDrive Sync Errors for Temporary LibreOffice Files
Question details
The user needs to resolve a OneDrive synchronization error triggered by invalid file names from temporary LibreOffice lock files or conflicts from dual cloud syncing.

- Product
- OneDrive
- Device & OS
- Windows
- Scenario
- Synchronizing a local document folder to OneDrive while using LibreOffice.
- Observed behavior
- OneDrive rejects temporary lock files (e.g., .~lock.filename.odt#) because the naming convention is incompatible with OneDrive sync. Errors also arise when the same folder is synced with both Google Drive and OneDrive.
Ensure you have saved all your ongoing work and completely closed the LibreOffice application before attempting to resolve the synchronization issues.
Delete or Rename the Lingering Lock File
Use this solution if a temporary LibreOffice file is preventing OneDrive from syncing your folder properly.
LibreOffice automatically creates temporary lock files to prevent simultaneous editing. Usually, these files disappear when you close the document. If the application crashes or fails to clean up, the lock file remains and blocks OneDrive synchronization.
Save your work and exit LibreOffice. Check if the temporary lock file (ending in #) automatically disappears from the document folder.
If the file remains after closing the application, right-click the .~lock file and select 'Delete' or 'Rename' to remove the incompatible characters.
Click the OneDrive icon in your taskbar, navigate to the settings menu, and select 'View sync problems' to confirm the error is resolved.

Resolve Dual-Sync Conflicts with Google Drive
Apply this fix if you are simultaneously syncing the same folder with both OneDrive and Google Drive.
Switch to WPS Office to Avoid File Sync Conflicts
If you frequently encounter temporary file conflicts and sync errors while managing your documents, consider switching to WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Office, ensuring smooth document management without generating complex lock files that disrupt OneDrive or Google Drive.
- 1. Download and Install: Visit the official WPS website to download the free installer and follow the on-screen instructions to set it up.
- 2. Open Your Documents: Launch WPS Office and directly open your existing Word, Excel, or PowerPoint files with perfect formatting preservation.
- 3. Save and Sync Smoothly: Save your documents in your OneDrive folder; WPS Office handles background saving smoothly without triggering invalid filename errors.

Frequently Asked Questions
Why does LibreOffice create a .~lock file?
LibreOffice creates temporary hidden lock files to track who is currently editing a document. This prevents multiple users from making conflicting changes at the same time. The file is meant to be automatically deleted once the document is closed.
Can I sync one local folder to both OneDrive and Google Drive?
It is highly discouraged. Synchronizing the same local folder with two different cloud services simultaneously often leads to file lock issues, duplicated conflict files, and continuous sync errors.
How do I find out which specific file is causing the OneDrive sync error?
Click the OneDrive cloud icon in your Windows taskbar. If there is an error, you will see a warning message. Click on 'View sync problems' to see a detailed list of exactly which files are failing to upload.




