From 94631e91fbb3445e94e3953087dc01eafd799728 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Thu, 25 Jan 2024 10:38:30 +0000 Subject: [PATCH 1/5] Fix in name log --- .../owncloud/android/lib/common/utils/OCFileLoggingTree.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt index a6e96758512..3889e86c473 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt @@ -58,7 +58,11 @@ class OCFileLoggingTree( it.list()?.let { logFiles -> if (logFiles.isNotEmpty()) { - val lastDateLogFileString = logFiles.last().substringAfterLast("owncloud.").substringBeforeLast(".log") + val lastDateLogFileString = if (context != null) { + logFiles.last().substringAfterLast( context.packageName + ".").substringBeforeLast(".log") + } else { + logFiles.last().substringBeforeLast(".log") + } val dateFormat = SimpleDateFormat(LOG_FILE_TIME_FORMAT) val lastDayLogFileDate = dateFormat.parse(lastDateLogFileString) From e0977cf0f08ef4a341399e022abebdd2ed3863cc Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Thu, 25 Jan 2024 10:51:01 +0000 Subject: [PATCH 2/5] Reformat code --- .../com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt index 3889e86c473..0ce0f80ca9e 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt @@ -59,7 +59,7 @@ class OCFileLoggingTree( if (logFiles.isNotEmpty()) { val lastDateLogFileString = if (context != null) { - logFiles.last().substringAfterLast( context.packageName + ".").substringBeforeLast(".log") + logFiles.last().substringAfterLast("${context.packageName}.").substringBeforeLast(".log") } else { logFiles.last().substringBeforeLast(".log") } From 467163c340a829cddff722a79a0f05f3d2295672 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Thu, 25 Jan 2024 13:34:12 +0000 Subject: [PATCH 3/5] added filename when context is null --- .../owncloud/android/lib/common/utils/OCFileLoggingTree.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt index 0ce0f80ca9e..09a7028347e 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt @@ -37,7 +37,7 @@ import java.util.UUID class OCFileLoggingTree( externalCacheDir: File, context: Context? = null, - filename: String = UUID.randomUUID().toString(), + var filename: String = UUID.randomUUID().toString(), private val newLogcat: Boolean = true, ) : Timber.DebugTree() { @@ -61,7 +61,7 @@ class OCFileLoggingTree( val lastDateLogFileString = if (context != null) { logFiles.last().substringAfterLast("${context.packageName}.").substringBeforeLast(".log") } else { - logFiles.last().substringBeforeLast(".log") + logFiles.last().substringAfterLast("$filename.").substringBeforeLast(".log") } val dateFormat = SimpleDateFormat(LOG_FILE_TIME_FORMAT) From 31ad632406fd452d211c27297ad63f49813302a4 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Fri, 26 Jan 2024 07:39:16 +0000 Subject: [PATCH 4/5] deleted var --- .../com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt index 09a7028347e..dab7111d9c8 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/utils/OCFileLoggingTree.kt @@ -37,7 +37,7 @@ import java.util.UUID class OCFileLoggingTree( externalCacheDir: File, context: Context? = null, - var filename: String = UUID.randomUUID().toString(), + filename: String = UUID.randomUUID().toString(), private val newLogcat: Boolean = true, ) : Timber.DebugTree() { From e3b0d7e6e385b62f83fa68b47614a5e05364c6c0 Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Mon, 29 Jan 2024 07:40:54 +0000 Subject: [PATCH 5/5] Calens changelog updated --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f303b998955..56c0e04afe5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 - Handle Http 423 (resource locked): [#4282](https://github.com/owncloud/android/issues/4282) * 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) @@ -123,6 +124,14 @@ ownCloud admins and users. https://github.com/owncloud/android/issues/4279 https://github.com/owncloud/android/pull/4287 +* Bugfix - Handle Http 423 (resource locked): [#4282](https://github.com/owncloud/android/issues/4282) + + App can gracefully show if the file is locked when done certain operations on + it. + + https://github.com/owncloud/android/issues/4282 + https://github.com/owncloud/android/pull/4285 + * 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