# 严重数据丢失风险：云端空文件夹同步到本地已有文件夹时疑似清空本地文件

**URL:** <https://help.nextcloud.com/t/topic/246203>\
**Category:** 🇨🇳 汉语; (chinese)\
**Tags:** feature\
**Created:** [June 24, 2026, 3:55pm UTC](https://help.nextcloud.com/t/topic/246203 "2026-06-24T15:55:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashonegraalvm](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ashonegraalvm/32/78884_2.png) [@ashonegraalvm](https://help.nextcloud.com/u/ashonegraalvm)\
**Post date:** [June 24, 2026, 3:55pm UTC](https://help.nextcloud.com/t/topic/246203/1 "2026-06-24T15:55:21Z")

</div>

我在 Nextcloud 云端新建了一个空文件夹，然后将它同步到 Windows 本地一个已有大量文件的目录。同步后，本地目录中的 session 文件和工作文件疑似被清空，Nextcloud Web 端也看不到这些文件。

我认为这是严重的数据丢失风险：当云端目录为空、本地目录非空时，Nextcloud 客户端不应该默认用云端空目录覆盖/删除本地已有内容。至少应该在同步前检测本地目录非空，并明确提示用户选择"上传本地文件、创建冲突、删除本地文件或取消"，而不是静默执行可能导致数据丢失的同步操作。

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [June 24, 2026, 8:36pm UTC](https://help.nextcloud.com/t/topic/246203/2 "2026-06-24T20:36:23Z")

</div>

Hello @ashonegraalvm,

welcome to the Nextcloud community! 🤝

on first sync cycle the server has precedence  
AFAIK if you setup a new account desktop client clearly tells you to new a new empty directory - the user still may choose directory with existing data to speed up a sync - but in case server is empty this results in data loss as you described. I don’t think more can be done to prevent issues.
