Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Conflict in copy: File without extension #4294

Merged
merged 8 commits into from
Jan 26, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ ownCloud admins and users.
* Bugfix - Conflict in copy with files without extension: [#4222](https://github.com/owncloud/android/issues/4222)
* Bugfix - Add "scope" parameter to /token endpoint HTTP requests: [#4260](https://github.com/owncloud/android/pull/4260)
* Bugfix - Fix in the handling of the base URL: [#4279](https://github.com/owncloud/android/issues/4279)
* Bugfix - Copy folder into descendant in different spaces: [#4293](https://github.com/owncloud/android/issues/4293)
* Change - Android library as a module instead of submodule: [#3962](https://github.com/owncloud/android/issues/3962)
* Enhancement - Koin DSL: [#3966](https://github.com/owncloud/android/pull/3966)
* Enhancement - Unit tests for datasources classes - Part 1 & Fixes: [#4063](https://github.com/owncloud/android/issues/4063)
@@ -122,6 +123,14 @@ ownCloud admins and users.
https://github.com/owncloud/android/issues/4279
https://github.com/owncloud/android/pull/4287

* Bugfix - Copy folder into descendant in different spaces: [#4293](https://github.com/owncloud/android/issues/4293)

Copying a folder into another folder with the same name in a different space now
works correctly.

https://github.com/owncloud/android/issues/4293
https://github.com/owncloud/android/pull/4295

* Change - Android library as a module instead of submodule: [#3962](https://github.com/owncloud/android/issues/3962)

Android library, containing all networking stuff, is now the 5th module in the
6 changes: 6 additions & 0 deletions changelog/unreleased/4295
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Copy folder into descendant in different spaces

Copying a folder into another folder with the same name in a different space now works correctly.

https://github.com/owncloud/android/issues/4293
https://github.com/owncloud/android/pull/4295
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ class CopyFileUseCase(
fun validateOrThrowException(listOfFilesToCopy: List<OCFile>, targetFolder: OCFile) {
require(listOfFilesToCopy.isNotEmpty())

if (listOfFilesToCopy.any { targetFolder.remotePath.startsWith(it.remotePath) }) {
if (listOfFilesToCopy.any { targetFolder.remotePath.startsWith(it.remotePath) && targetFolder.spaceId == it.spaceId }) {
throw CopyIntoDescendantException()
}
}