owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.76k stars 3.09k forks source link

[BUG] Av. offline files removed locally with the `Local only` option #4399

Closed Aitorbp closed 2 weeks ago

Aitorbp commented 1 month ago

Related Issues

App:https://github.com/owncloud/android/issues/4353


QA

Reports:

Aitorbp commented 4 weeks ago

Checks functionalities of deleteLocalFolderRecursively:

Case Delete files only local:

  1. Create a folder with an available offline file and another downloaded file inside.
  2. Delete the folder only local.
  3. Check in Device Explorer that only the downloaded file has been deleted and both the parent folder and the available offline file are kept.

Case refresh on a folder that no longer exists:

  1. Create a folder with available offline and downloaded files inside.
  2. Delete the folder from the web.
  3. Do a refresh in the main list.
  4. Check that all files and also the available offline files have been deleted on that folder in Device Explorer

Case move folder with a source folder that no longer exists:

  1. Create a folder with downloaded and available offline files.
  2. Start the process of moving the folder.
  3. Go to the web and delete the source folder.
  4. End the move process.
  5. Check Device Explorer to see if the entire source folder has been deleted.

If you move a folder to a destination folder that no longer exists:

  1. Move a folder or file to a folder with available offline and downloaded files inside.
  2. In the process of moving it, we delete the folder from the web.
  3. We finish the process of moving the folder.
  4. Check Device Explorer to see if the entire destination folder has been deleted

If you copy a folder from a source folder that no longer exists:

  1. Create a folder with download and available offline files.
  2. Start the process of copying the folder.
  3. Go to the web and delete the source folder.
  4. Check Device Explorer to see if the entire source folder has been deleted when the process is finished

If you copy a folder to a destination folder that no longer exists:

  1. Copy a folder or file to a folder with available offline and downloaded files inside.
  2. In the process of moving it, we delete the folder from the web.
  3. We finish the process of moving the folder.
  4. Check in Device Explorer if the entire destination folder has been deleted.

I leave you these test cases in case you want to try them when doing QA @jesmrec

jesmrec commented 3 weeks ago

First, checks over https://github.com/owncloud/android/issues/4402, that is merged into here

Folder with some files and a subfolders that also contains some files

Folder1 | File1 | File2 | Folder2     | File3     |_ File4

jesmrec commented 3 weeks ago

Basic behaviour:

Remove folder dialog when...:

All those tests were repeated with files inside a subfolder.

Local copies of the items removed externally:

jesmrec commented 3 weeks ago

(1) [FIXED]

I noticed the bad behaviour when a sync is performed (not an av. offline);

With the following structure:

Folder with some files and a subfolders that also contains some files

Folder1 | File1 | File2 | Folder2     | File3     |_ File4

  1. Download File3
  2. Remove locally File3
  3. Sync Folder1
  4. Browse to Folder2

Current:

File3 and File 4 are not downloaded.

Expected:

Both File3 and File4 are downloaded, because their parent folder was synced in the previous step.

That was the problem fixed in https://github.com/owncloud/android/issues/4402 from the av. offline files, that seems to be reproducible with sync.

Pixel 2, Android 11 62a76c55

jesmrec commented 2 weeks ago

Approved on my side.