nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.99k stars 789 forks source link

Renaming a folder deletes files in subfolders #969

Closed Peac closed 4 years ago

Peac commented 5 years ago

Expected behaviour

Folder X should be renamed and nothing else should happen.

Actual behaviour

Folder X gets renamed but the file in the subfolder will be deleted (on the server -> on all other clients).

Steps to reproduce

  1. Create a folder X with a subfolder and place any file in the subfolder
  2. Rename folder X

Client configuration

Client version: 2.5.1

Operating system: Ubuntu 18.04.1

OS language: German

Qt version used by client package (Linux only, see also Settings dialog): Don't know, it's not mentioned in the Nextcloud client settings.

Client package (From Nextcloud or distro) (Linux only): From Nextcloud

Installation path of client: Default

Peac commented 5 years ago

For now, I'm switching back to 2.3.3 That version is not deleting files when you rename or move something.

Don't know why the new version of the sync client is that bad. The server is developing well. Even the Android app is quite good now. Hopefully, the users won't be scared away by the sync client.

chaos-prevails commented 5 years ago

I have exactly the same problem. I just migrated from NC 11->NC12->NC13->NC14->NC15 (i know ...). everything went super-smooth, I rebuilt indexes, and bigint as recommended, followed the advice for OPcache, etc, and then experienced this problem with 2.5.1, both on Windows (10), and Linux (ubuntu 18.04):

Actual behaviour 1) rename a folder aaa to aaa_linux_rename 2) server activity shows "you renamed aaa to aaa_linux_rename" 3) then I see many more "activities" subfolders, and files within "aaa_linux_rename" are deleted, and then recreated again. If there are many files (>200MB, I tested with 4GB folder) all those files/folders are deleted and sync finishes successful. Afterwards I have to quit nextcloud-client, and start again, to have the folders/files recreated again (might take 1-2 sync procedures to get everything back again). Not very nice for the trashbin ...

The server shows nothing in the log.

The client 2.5.1 shows:

=#=#=# Syncrun started 2019-02-16T20:57:03Z

=#=#=#=# Propagation starts 2019-02-16T20:57:03Z (last step: 452 msec, total: 452 msec)

20:57:03||MyDocuments (2)/aaa -> MyDocuments (2)/aaa_linux_rename|INST_RENAME|Up|1550350585|5c684a32076eb|0|00012707oc9x06m72xyp|4||201|0|0|||| ||MyDocuments (2)/aaa_linux_rename/huhu -> MyDocuments (2)/aaa_linux_rename/huhu|INST_RENAME|Up|1550350583|5c684a32076eb|0|00012731oc9x06m72xyp|4||0|4096|1550350583|||| ||MyDocuments (2)/aaa_linux_rename/About.txt -> MyDocuments (2)/aaa_linux_rename/About.txt|INST_RENAME|Up|1491908900|fdef5d18fc7e9a7930f4f6a99473919d|1074|00012725oc9x06m72xyp|4||0|1074|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/Cartagena_Colombia.jpg -> MyDocuments (2)/aaa_linux_rename/Cartagena_Colombia.jpg|INST_RENAME|Up|1477484992|bcd04a9ab2e757d292e409ecf2c2c7cb|626771|00012708oc9x06m72xyp|4||0|626771|1477484992|||| ||MyDocuments (2)/aaa_linux_rename/Cartagena_Colombia_195.jpg -> MyDocuments (2)/aaa_linux_rename/Cartagena_Colombia_195.jpg|INST_RENAME|Up|1477484994|1b18e551e0b2d7eee17a0a017a0ad548|328543|00012711oc9x06m72xyp|4||0|328543|1477484994|||| ||MyDocuments (2)/aaa_linux_rename/Nextcloud Manua444l333.pdf -> MyDocuments (2)/aaa_linux_rename/Nextcloud Manua444l333.pdf|INST_RENAME|Up|1491908899|10ef500eb0131e52afdf225049c6fea6|4173810|00012727oc9x06m72xyp|4||0|4173810|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/Nextcloud Manual (2).pdf -> MyDocuments (2)/aaa_linux_rename/Nextcloud Manual (2).pdf|INST_RENAME|Up|1484218368|20eab197d68720d9e060370ed7b9188f|4173810|00012709oc9x06m72xyp|4||0|4173810|1484218368|||| ||MyDocuments (2)/aaa_linux_rename/Nextcloud Manual.pdf -> MyDocuments (2)/aaa_linux_rename/Nextcloud Manual.pdf|INST_RENAME|Up|1491908899|7635c9ccae4fd20952cb4103fe8833aa|4173810|00012728oc9x06m72xyp|4||0|4173810|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/Nextcloud Manual333 (2).pdf -> MyDocuments (2)/aaa_linux_rename/Nextcloud Manual333 (2).pdf|INST_RENAME|Up|1484218368|e124f7ba20b51006055e3d18cf890d40|4173810|00012710oc9x06m72xyp|4||0|4173810|1484218368|||| ||MyDocuments (2)/aaa_linux_rename/Nextcloud Manual333.pdf -> MyDocuments (2)/aaa_linux_rename/Nextcloud Manual333.pdf|INST_RENAME|Up|1491908900|5ff3051912702c0ff7bc18c2ed56fcac|4173810|00012729oc9x06m72xyp|4||0|4173810|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/Palace_of_Brussels.jpg -> MyDocuments (2)/aaa_linux_rename/Palace_of_Brussels.jpg|INST_RENAME|Up|1477484994|0c3a4d01506896eeef2123ba5212dc65|984006|00012712oc9x06m72xyp|4||0|984006|1477484994|||| ||MyDocuments (2)/aaa_linux_rename/SampleVideo_1280x720_1mb.mp4 -> MyDocuments (2)/aaa_linux_rename/SampleVideo_1280x720_1mb.mp4|INST_RENAME|Up|1477484994|aea01c670572bcfa02ddc3f94e2329ef|1055736|00012713oc9x06m72xyp|4||0|1055736|1477484994|||| ||MyDocuments (2)/aaa_linux_rename/aaaa.pdf -> MyDocuments (2)/aaa_linux_rename/aaaa.pdf|INST_RENAME|Up|1491908900|b35f38d8969d4411257c1bfcab8adead|4173810|00012734oc9x06m72xyp|4||0|4173810|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/bird.avi -> MyDocuments (2)/aaa_linux_rename/bird.avi|INST_RENAME|Up|1477484994|ee388b4493b2b9fbe95c5c1d908b39de|1496576|00012714oc9x06m72xyp|4||0|1496576|1477484994|||| ||MyDocuments (2)/aaa_linux_rename/friday_1484.odp -> MyDocuments (2)/aaa_linux_rename/friday_1484.odp|INST_RENAME|Up|1477489690|822908cd353488d604daa1fd536f4600|571855|00012758oc9x06m72xyp|4||0|571855|1477489690|||| ||MyDocuments (2)/aaa_linux_rename/kletzenbrot.jpg -> MyDocuments (2)/aaa_linux_rename/kletzenbrot.jpg|INST_RENAME|Up|1477485000|5fef515776548dc0aa6ab1fa537254d0|176741|00012715oc9x06m72xyp|4||0|176741|1477485000|||| ||MyDocuments (2)/aaa_linux_rename/msss.accdb -> MyDocuments (2)/aaa_linux_rename/msss.accdb|INST_RENAME|Up|1477490060|d4d13474408d57e82a73a75fea7629e9|495616|00012760oc9x06m72xyp|4||0|495616|1477490060|||| ||MyDocuments (2)/aaa_linux_rename/rdc_boite_disque_dur.jpg -> MyDocuments (2)/aaa_linux_rename/rdc_boite_disque_dur.jpg|INST_RENAME|Up|1477485000|f207c56c3c1ed0db1f10b0a74fb135c6|152197|00012716oc9x06m72xyp|4||0|152197|1477485000|||| ||MyDocuments (2)/aaa_linux_rename/us_shipito.jpg -> MyDocuments (2)/aaa_linux_rename/us_shipito.jpg|INST_RENAME|Up|1477485000|5ce4cb81022c68ea49b3fe60c5ae62ad|36495|00012718oc9x06m72xyp|4||0|36495|1477485000|||| ||MyDocuments (2)/aaa_linux_rename/us_shipito_all.jpg -> MyDocuments (2)/aaa_linux_rename/us_shipito_all.jpg|INST_RENAME|Up|1477485000|cf8229fffbb3bf23f8b8c4b5ed7b9934|49045|00012719oc9x06m72xyp|4||0|49045|1477485000|||| ||MyDocuments (2)/aaa_linux_rename/us_shipito_ebay_new.jpg -> MyDocuments (2)/aaa_linux_rename/us_shipito_ebay_new.jpg|INST_RENAME|Up|1477485000|ea7bdbc0e2a59a15c29e752adcc837b3|75450|00012720oc9x06m72xyp|4||0|75450|1477485000|||| ||MyDocuments (2)/aaa_linux_rename/w1dx.docx -> MyDocuments (2)/aaa_linux_rename/w1dx.docx|INST_RENAME|Up|1491908900|2aafd29ef207cf545305dacf13d26b86|0|00012732oc9x06m72xyp|4||0|0|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/wd.doc -> MyDocuments (2)/aaa_linux_rename/wd.doc|INST_RENAME|Up|1491908900|344a3f52cfe0642a569d8072e818a248|22528|00012736oc9x06m72xyp|4||0|22528|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/wdx.docx -> MyDocuments (2)/aaa_linux_rename/wdx.docx|INST_RENAME|Up|1491908900|5751efeb8f77a9526465ed374b78257e|4100748|00012741oc9x06m72xyp|4||0|4100748|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/wop.odp -> MyDocuments (2)/aaa_linux_rename/wop.odp|INST_RENAME|Up|1491908899|b269846d3950ea03a0685bc85685da38|571855|00012740oc9x06m72xyp|4||0|571855|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/wot.odt -> MyDocuments (2)/aaa_linux_rename/wot.odt|INST_RENAME|Up|1491908899|f9430f3af41fd856d2c4893b9c177af5|73181|00012739oc9x06m72xyp|4||0|73181|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/wp.ppt -> MyDocuments (2)/aaa_linux_rename/wp.ppt|INST_RENAME|Up|1491908899|8ece668ecef052450be55e78882a2a9c|912384|00012743oc9x06m72xyp|4||0|912384|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/wpx.pptx -> MyDocuments (2)/aaa_linux_rename/wpx.pptx|INST_RENAME|Up|1491908899|91241b0c9b9ac440abb39bc0af5f0f45|867751|00012742oc9x06m72xyp|4||0|867751|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/wx.xls -> MyDocuments (2)/aaa_linux_rename/wx.xls|INST_RENAME|Up|1491908900|4241db7407a0931c3ccecf3189e4d7a5|50176|00012744oc9x06m72xyp|4||0|50176|1491908900|||| ||MyDocuments (2)/aaa_linux_rename/wxx.xlsx -> MyDocuments (2)/aaa_linux_rename/wxx.xlsx|INST_RENAME|Up|1491908899|1b0b9e0a4522aedec36affc05e55c06b|8449|00012749oc9x06m72xyp|4||0|8449|1491908899|||| ||MyDocuments (2)/aaa_linux_rename/xxx.txt -> MyDocuments (2)/aaa_linux_rename/xxx.txt|INST_RENAME|Up|1491908899|f14e08cf75591a700309daf861b39650|165|00012747oc9x06m72xyp|4||0|165|1491908899|||| 20:57:04||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments|INST_REMOVE|Up|1550338602|5c684a32076eb|0|00012724oc9x06m72xyp|4||204|0|0||||

=#=#=# Syncrun finished 2019-02-16T20:57:05Z (last step: 1785 msec, total: 2237 msec)

=#=#=# Syncrun started 2019-02-16T20:57:51Z

=#=#=#=# Propagation starts 2019-02-16T20:57:52Z (last step: 789 msec, total: 789 msec)

=#=#=# Syncrun finished 2019-02-16T20:57:52Z (last step: 36 msec, total: 826 msec)

=#=#=# Syncrun started 2019-02-16T21:04:38Z

=#=#=#=# Propagation starts 2019-02-16T21:04:38Z (last step: 574 msec, total: 574 msec)

21:04:38||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments|INST_NEW|Up|1550350583||4096|01010604oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf|INST_NEW|Up|1550350583||4096|01010605oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder|INST_NEW|Up|1550350583||4096|01010606oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos|INST_NEW|Up|1550350583||4096|01010607oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1|INST_NEW|Up|1550350584||4096|01010608oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/créàtçßn|INST_NEW|Up|1550350583||4096|01010609oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/test_guate2_ddd|INST_NEW|Up|1550350583||4096|01010610oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/adfadsf|INST_NEW|Up|1550350583||4096|01010611oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared|INST_NEW|Up|1550350583||4096|01010614oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/Hummingbird.jpg|INST_NEW|Up|1477476706|c371f2f0b944cd4b11ae426e8c99e99b|585219|01010613oc9x06m72xyp|4||201|0|0|||| 21:04:39||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/Coast.jpg|INST_NEW|Up|1477476706|85eb078e57d8b9e93485ff6773bb8261|819766|01010612oc9x06m72xyp|4||201|0|0|||| 21:04:40||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/Nextcloud Manual333.pdf|INST_NEW|Up|1484218402|deef89a552f1478c32664c91616519b5|4173810|01010615oc9x06m72xyp|4||201|0|0|||| 21:04:40||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/adfadsf/Nextcloud Manua444l333.pdf|INST_NEW|Up|1484218402|94f25d5fd1853018505ed707977f5190|4173810|01010616oc9x06m72xyp|4||201|0|0|||| 21:04:40||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/adfadsf/Nextcloud Manual.pdf|INST_NEW|Up|1484218402|3ec8ad80752e6ab56ec7455a687d6f3f|4173810|01010617oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf|INST_NEW|Up|1550350583||4096|01010618oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/conflict.txt|INST_NEW|Up|1491908899|7206c0ad19a8d8c933d13459cb627b2a|46|01010620oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf/asdfasdf33|INST_NEW|Up|1550350583||4096|01010622oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/Nut.jpg|INST_NEW|Up|1477476706|e6330ad217c4bb292be2c671087c900e|955026|01010621oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf/Cartagena_Colombia.jpg|INST_NEW|Up|1491908899|fe2aa9b9a8da40d7a5b7aab92b70800a|626771|01010623oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf/asdfasdf33/New folder|INST_NEW|Up|1550350583||4096|01010624oc9x06m72xyp|4||201|0|0|||| 21:04:42||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf/Cartagena_Colombia_195.jpg|INST_NEW|Up|1491908899|f2cd01c493a0943940438a0ddb671bb4|328543|01010625oc9x06m72xyp|4||201|0|0|||| 21:04:42||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/recursively shared/dasf/asdfasdf33/New folder/New Journal Document.jnt|INST_NEW|Up|1491908899|cd24bc1522d2793e90da4ba383cb19ec|4544|01010626oc9x06m72xyp|4||201|0|0|||| 21:04:41||MyDocuments (2)/aaa_linux_rename/huhu/MyDocuments/dfadsf/New folder/Photos/project1/adfadsf/Nextcloud Manual333.pdf|INST_NEW|Up|1484218418|98dc5df10370c597aa3993ed94075d30|4173810|01010619oc9x06m72xyp|4||201|0|0||||

=#=#=# Syncrun finished 2019-02-16T21:04:43Z (last step: 4046 msec, total: 4620 msec)

=#=#=# Syncrun started 2019-02-16T21:05:35Z

=#=#=#=# Propagation starts 2019-02-16T21:05:37Z (last step: 1740 msec, total: 1740 msec)

=#=#=# Syncrun finished 2019-02-16T21:05:37Z (last step: 73 msec, total: 1813 msec)

So first all is inst_renamed, then inst_removed (in the log with the >GB rename there were many more INST_REMOVE), and then INST_NEW

downgrading to 2.3.3.1 solves this problem (move + rename works as before). I did not experience this problem with NC11, and we are 20+ users.

This is a real bummer, how do I explain this to my colleagues that everybody has to downgrade? I also found https://github.com/nextcloud/desktop/issues/506 which actually advises to move to 2.5.1. So what should I do now?

Peac commented 5 years ago

@chaos-prevails Yeah, the client is messed up at the moment. And it seems that there is no development activity for the last months either. Its just sad. The Nextcloud server is really awesome. Just the new client sucks.

chaos-prevails commented 5 years ago

I tried to follow it up more, and I see the following error in the desktop client (linux 2.5.1 from PPA)

[OCC::AbstractNetworkJob::start OCC::DeleteJob created for "https://Xyz.xyz" + "/testA/project1_rename7/recursively shared/dasf_rename9/asdfasdf33_rename11/New folder/New Journal Document.jnt" "OCC::PropagateRemoteDelete" [OCC::WebFlowCredentials::slotFinished request finished [OCC::WebFlowCredentials::stillValid Still valid? [OCC::WebFlowCredentials::stillValid QNetworkReply::NetworkError(NoError) [OCC::WebFlowCredentials::stillValid "Unknown error" [OCC::DeleteJob::finished DELETE of QUrl("https://xyz.xyz/remote.php/dav/files/xyz/testA/project1_rename7/recursively shared/dasf_rename9/asdfasdf33_rename11/New folder/New Journal Document.jnt") FINISHED WITH STATUS "OK"

based on that I found a similar thread https://github.com/nextcloud/desktop/issues/876

I don't use encryption, neither on the server nor client/end-to-end (never enabled the option in the server). However, the problem seems related. I have to quit, and reopen the client so the client uploads the files again it has deleted previously (due to a move/rename)

ghost commented 5 years ago

A note for others who find this issue: We also have seen this behaviour with desktop client 2.5.2 at Win 10 as well as with MacOS destktop client. Tested against two different servers running version 16. This issue is not related with sharing or using group folders app.

After updating the desktop client to version 2.5.3 renaming dirs works as expected. This new version fixes #1000, which seems to be related with this issue here.

phsc84 commented 4 years ago

Not an issue since 2.5.3 anymore. I have just tested it with 2.6 and it works fine. Can be closed.