[Bug]: creating a new folder in dir1 und move all files from dir1 into this newly created folder will delete all the moved files
⚠️ Before submitting, please verify the following: ⚠️
- [X] This is a bug, not a question or a configuration issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are up to date. See Server Maintenance and Release Schedule and Desktop Releases for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct
Bug description
creating a new folder in dir1 und move all files from (except dir folder) dir1 into this newly created folder will delete all the moved files
Virtual Agent is ACTIVE for this client (Windows System)
Steps to reproduce
- Windows Explorer: Navigate to folder "dir1"
- when in - create a new folder "newfolder"
- move all files in dir1 (execpt dir1 of course) into newfolder
- there are no more files in dir1 (exptected)
- list content of newfolder - newfolder is empty - so ALL FILES ARE GONE !
- login to the WEB (Edge Browser)
- all moved files are deleted, newfolder is empty too !
- check contents of Recycle bin - the just moved files are there
Expected behavior
- Windows file move operations should not destroy / remove / delete files
Which files are affected by this bug
folder: newfolder
Operating system
Windows
Which version of the operating system you are running.
Windows 11 Home 22H2
Package
Other
Nextcloud Server version
26.05
Nextcloud Desktop Client version
Version 3.10.0, windows-10.0.22621
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 3.4.2 to 3.4.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
Are you using an external user-backend?
- [ ] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Nextcloud Server logs
No response
Additional info
No response
happenend again today - now being on NC 27.1.2 and Windows Desktop 3.10.1
This Agent has the "Virtual Agent" active.
Scenario: (affected file: IMG_0600.jpg) see the log entries below
- create new folder on DIR1
- move (windows explorer Drag & Drop) two files from another Directory (DIR2) into this new folder DIR1.
- After moving the two files - they appear in DIR1
- After a short time (2...3 secs), one file dissapeared from DIR1 (but it was moved !) and this (disappeared) file does not exist anymore in DIR2 !
- again checking the "Trashbin" - the file was delelete (to Trashbin).
I think - if users are copying thousands of files and the users are not aware of this behave/bug - this can lead to data loss !
2023-10-31 20:33:35:003 [ info nextcloud.sync.discovery C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\libsync\discovery.cpp:464 ]: Processing "Photos/Events/directory/IMG_0600.jpg" | (db/local/remote) | valid: true/true/true | mtime: 1698779990/1698779990/1698779990 | size: 3202729/3202729/3202729 | etag: "2394e8dc930494944ca38384b08883"//"2394e8dc930494944ca38384b08883" | checksum: ""//"" | perm: "WDNVR"//"WDNVR" | fileid: "28383833oxnucdewanh"//"28383833oxnucdewanh" | type: CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked//not locked | metadata missing: /false/
2023-10-31 20:32:49:306 [ info nextcloud.gui.shellextensions.server C:\Users\User\AppData\Local\Temp\windows-18408\client-building\desktop\src\gui\shellextensionsserver.cpp:126 ]: "Photos/Events/directory/IMG_0600.jpg" record._lastShareStateFetchedTimestamp has less than 120000 ms difference with QDateTime::currentMSecsSinceEpoch(). Returning data from SyncJournal.
I have experienced the same issue multiple times. When moving a folder or multiple files on a desktop comptuer, they sometimes are deleted. They are moved to the NC recycle bin. I have two ideas that may initiate the problem:
- the files in the directory are not yet synchronzed to the desktop, and they are already moved again.
- I set my computer to standby or hibernate, and sometimes it looks like NC desktop client needs te be restarted after waking up to function properly.
NC 28.0.3
Same issue described here: https://help.nextcloud.com/t/virtual-files-deleted-after-moving/115814/2
Is this reproducible with 3.13? Does it happen in a subfolder of a groupfolder?
Yes, this is reproducable on one of my computers (the others work fine).
NC 28.04 Desktop client 3.13 Using virtual files on Windows
Steps
Step 1: use windows file explorer to create Folder_1 on root level Step 2: use windows file explorer to create Folder_2 on root level Step 3: use nextcloud web interface to upload a file in Folder 1 Step 4: after windows desktop has synced, drag the uploaded file from Folder_1 to Folder_2
Result
The file is deleted / moved to the trash bin on Nextcloud (see the web interface) In windows file explorer the file is still in Folder_2, with status syncing. Nextcloud desktop seems to be stuck now, because new files are no longer synced. Closing and starting Nextcloud is needed to get it working again
I am not using group folders, because at first I thought the issue was related to group folders. But I think the issue is both on personal files as on group folders.
@camilasan : are you able to reproduce the bug?
Any update on this? The issue is still happening even on Desktop Client 3.14.1 and Nextcloud 28.0.8. Is there a fix for this yet or a workaround?
I have this issue with desktop client 3.14.1 and nextcloud 30.0.1
I have three computers (2 x W10 and 1 x W11) with the same NC client and they all are using the same NC server. One of the computers has this issue (W10). The others don't. So I guess it has something to do with the setup or configuration of Windows in combination with the client. I reinstalled the client on the computer that has the issue, but that didn't work. Apart from the issue above, I also notice that sometimes a new, copied file is not synchronized (the status is that it has to be syncrhonized with the two arrows in a circle). But if I change the name, it starts synchronizing. Also restarting nextcloud makes the synchonization of these files start. I had the idea that this might be a conflict with MS OneDrive. I disabled the startup of OneDrive when windows starts, but that didn't make a difference. This issue makes it impossible to use NC client on the computer, which to me is the way to work with files. Hopefully the problem will be found soon. If I can test anything, let me know.
In my case its W11
at all could you test again with release 3.15.0 ? if I understand correctly this issue, this might have been fixed in 3.15.0
I repeated the steps in https://github.com/nextcloud/desktop/issues/6151#issuecomment-2137745266, and I had the exact same result, although I don't get the 'conflict' message after restarting the client.
currently have 3.15.0 installed on Windows 11 - but without Virtual Agent .. (i do not intend to activate it again). Have got no other Machine/Windows to test this unfortunately.
Because I don't have this issue on two other computers, I intend to reinstall the computer where this issue occurs (somewhere before the end of January). @mgallien : do you need any other info of the setup of the computer with the issue, because it seems to be setup related. Uninstalling and reinstalling doesn't seem to repair something that is broken in the setup. Also closing OneDrive and/or reinstalling onedrive doesn't seem to fix anything (I thought there might be a setup conflict since NC and Onedrive must share some functions of windows).
Let me know if I can help you with info or otherwise.
Hello,
the client was enhanced significantly since the opening of this ticket. If you are still encountering issues, please get back to us
I am on Desktop Client 3.17.1 and nextcloud 31.0.8, and the issue is still there.
thank you for supporting with the retest
@mgallien can you test on your side?
Just to be clear: I only have this issue on one computer. Moving files with file explorer on other computers work fine. So something is broken on this computer, and reinstalling (removing/installing) Nextcloud Desktop does not change that. I also have Onedrive on my computer and that works fine. Whether this is a NC problem or Windows problem isn't clear for me, but from a user point of view it is a risk that files can just be deleted while you think you have moved them. NC should be reliable even if there is a fault in Windows. It would be good for NC if this risk is eliminated I am not sure how moving works. Does it copy a file to the new location and remove the old file or does it work differently? Is it possible to check the result of moving a file? If you need any info from my computer, let me know (currently on Windows 10).
We also have the same happening on quite a few computers. I only see this issue if the desktop client is set to virtual files. This has not happened to users that have the entire nextcloud available locally.
Also experiencing a similar problem on a computer, as reported here.
The client sends any new files moved with certain extensions (.igw, .img, or .rrd) on this computer, to any folder being synchronized, to the Windows Recycle Bin.
The log for one of these files shows the following information:
Line 293: 2025-11-09 10:54:54:625 [ info nextcloud.gui.folderwatcher C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\folderwatcher.cpp:239 ]: Detected changes in paths: QSet("D:/Nextcloud/Desktop/26_768.img")Line 297: 2025-11-09 10:54:54:910 [ warning nextcloud.gui.shellextensions.server C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\shellextensionsserver.cpp:99 ]: Record not found in SyncJournal for: "Desktop/26_768.img"Line 312: 2025-11-09 10:54:55:241 [ warning nextcloud.gui.shellextensions.server C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\shellextensionsserver.cpp:99 ]: Record not found in SyncJournal for: "Desktop/26_768.img"Line 330: 2025-11-09 10:54:56:308 [ warning nextcloud.gui.shellextensions.server C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\shellextensionsserver.cpp:99 ]: Record not found in SyncJournal for: "Desktop/26_768.img"Line 381: 2025-11-09 10:54:57:006 [ warning nextcloud.sync.discovery C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\discovery.cpp:1480 ]: Wiping virtual file without db entry for "Desktop/26_768.img"Line 382: 2025-11-09 10:54:57:006 [ info nextcloud.sync.discovery C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\discovery.cpp:1881 ]: Processing "Desktop/26_768.img" | (db/local/remote) | valid: false/true/db | mtime: 0/1762696476/0 | size: 0/51231249/0 | etag: ""//"" | checksum: ""//"" | perm: ""//"" | fileid: ""//"" | inode: 0/44952/ | type: CSyncEnums::ItemTypeSkip/CSyncEnums::ItemTypeVirtualFileDownload/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: ""/"" | file lock: not locked// | file lock type: ""//"" | live photo: false//false | metadata missing: /true/Line 383: 2025-11-09 10:54:57:006 [ info nextcloud.sync.discovery C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\discovery.cpp:1882 ]: discovered "Desktop/26_768.img" CSyncEnums::CSYNC_INSTRUCTION_REMOVE OCC::SyncFileItem::Down CSyncEnums::ItemTypeVirtualFileLine 396: 2025-11-09 10:54:57:010 [ info nextcloud.sync.statustracker C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\syncfilestatustracker.cpp:233 ]: Investigating "Desktop/26_768.img" OCC::SyncFileItem::NoStatus CSyncEnums::CSYNC_INSTRUCTION_REMOVE OCC::SyncFileItem::Down CSyncEnums::ItemTypeVirtualFileLine 429: 2025-11-09 10:54:57:888 [ info nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\owncloudpropagator.h:213 ]: Starting CSyncEnums::CSYNC_INSTRUCTION_REMOVE propagation of "Desktop/26_768.img" by OCC::PropagateLocalRemove(0x2b0fb317bc0)Line 431: 2025-11-09 10:54:57:888 [ info nextcloud.log.permanent C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\propagatorjobs.cpp:102 ]: delete "Desktop/26_768.img" "Processing \"Desktop/26_768.img\" | (db/local/remote) | valid: false/true/db | mtime: 0/1762696476/0 | size: 0/51231249/0 | etag: \"\"//\"\" | checksum: \"\"//\"\" | perm: \"\"//\"\" | fileid: \"\"//\"\" | inode: 0/44952/ | type: CSyncEnums::ItemTypeSkip/CSyncEnums::ItemTypeVirtualFileDownload/CSyncEnums::ItemTypeFile | e2ee: false/false | e2eeMangledName: \"\"/\"\" | file lock: not locked// | file lock type: \"\"//\"\" | live photo: false//false | metadata missing: /true/"Line 432: 2025-11-09 10:54:57:888 [ info nextcloud.sync.propagator.localremove C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\propagatorjobs.cpp:110 ]: Going to delete: "D:/Nextcloud/Desktop/26_768.img"Line 434: 2025-11-09 10:54:57:954 [ info nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\owncloudpropagator.cpp:282 ]: Completed propagation of "Desktop/26_768.img" by OCC::PropagateLocalRemove(0x2b0fb317bc0) with status OCC::SyncFileItem::SuccessLine 435: 2025-11-09 10:54:57:957 [ warning nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\tray\usermodel.cpp:921 ]: Item "Desktop/26_768.img" retrieved resulted in ""Line 436: 2025-11-09 10:54:57:958 [ info nextcloud.gui.folderwatcher C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\gui\folderwatcher.cpp:239 ]: Detected changes in paths: QSet("D:/Nextcloud/Desktop/26_768.img")Line 437: 2025-11-09 10:54:57:958 [ warning nextcloud.sync.vfs.cfapi.wrapper C:\Users\User\AppData\Local\Temp\windows-34783\client-building\desktop\src\libsync\vfs\cfapi\cfapiwrapper.cpp:985 ]: does not exist "D:\\Nextcloud\\Desktop\\26_768.img"
System:
- Windows 11 25H2
- Nextcloud Client 4.1.0 (alpha)
- Nextcloud AIO v11.10.0
- Nextcloud Hub 25 Autumn (32.0.0)