Repository navigation
Conversation
118a028 to
9efa156
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/27058366047/artifacts/7453194578 |
| Log_OC.d(TAG, "Creating temporal folder") | ||
| val temporalParent = targetFile.parentFile | ||
|
|
||
| if (!temporalParent!!.mkdirs() && !temporalParent.isDirectory) { |
| Log_OC.d(TAG, "Creating temporal folder") | ||
| val temporalParent = targetFile.parentFile | ||
|
|
||
| if (!temporalParent!!.mkdirs() && !temporalParent.isDirectory) { |
| } | ||
|
|
||
| Log_OC.d(TAG, "Creating temporal file") | ||
| if (!targetFile.createNewFile() && !targetFile.isFile) { |
| } | ||
|
|
||
| Log_OC.d(TAG, "Creating temporal file") | ||
| if (!targetFile.createNewFile() && !targetFile.isFile) { |
| } else { | ||
| `in` = FileInputStream(sourceFile) | ||
| } | ||
| out = FileOutputStream(targetFile) |
| private fun move(sourceFile: File, targetFile: File) { | ||
| if (targetFile != sourceFile) { | ||
| val expectedFolder = targetFile.parentFile | ||
| Files.createDirectories(expectedFolder!!.toPath()) |
| val expectedFolder = targetFile.parentFile | ||
| Files.createDirectories(expectedFolder!!.toPath()) | ||
|
|
||
| if (expectedFolder.isDirectory) { |
| Files.createDirectories(expectedFolder!!.toPath()) | ||
|
|
||
| if (expectedFolder.isDirectory) { | ||
| if (!sourceFile.renameTo(targetFile)) { |
| if (expectedFolder.isDirectory) { | ||
| if (!sourceFile.renameTo(targetFile)) { | ||
| // try to copy and then delete | ||
| Files.createFile(targetFile.toPath()) |
| Files.createFile(targetFile.toPath()) | ||
| try { | ||
| FileInputStream(sourceFile).channel.use { inChannel -> | ||
| FileOutputStream(targetFile).channel.use { outChannel -> |
b5e43ff to
317a04b
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/27059364136/artifacts/7453518059 |
Signed-off-by: Hannes Achleitner <hannes.software@gmx.at>
317a04b to
79ab1da
Compare
|
APK file: https://github.com/nextcloud/android/actions/runs/27059855267/artifacts/7453666242 |
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
alperozturk96
left a comment
There was a problem hiding this comment.
Thanks for working on this.
I'd be more comfortable taking an incremental approach, for example, first extracting smaller pieces into separate Kotlin classes and then gradually converting the remaining parts. That would make the changes easier to review, test, and debug if anything goes wrong.
|
@alperozturk96 After 5 weeks. you want to multiply the afford here by splitting it in smaller junks. you should re-think your comfortable it's-better-for-me-way |
|
Alper and me discussed this and to put it in bigger context, we struggle a bit with "automatic" java -> kotlin conversions, especially when it comes to big/central classes that are not easy to test manually (in opposite to UI related classes).
This will help us, not only for this PR, but also for upcoming semi/automated code conversions to see if this approach works. I wanna thank you for helping with this project and PR 馃帀 |
|
It seems like the following cases are currently missing on master and would be good to have covered before the Kotlin conversion:
Since this class is responsible for all uploads (AutoUpload, normal upload, etc.). |
@tobiasKaminsky I want to tell my my frustration. I made this, I didn't changed anything on the logic and it was working for me. But as it is not yours, you all put the brake and hesitate to accept it. -Ok, it's your choice- But what does this mean for me ? It was just an intermediate step for me to solving an other (later) issue. But as this is not accepted, and dedicated to be pointless and to die, I stopped my afford to Nextcloud complete and unfortunately I've to keep on ownCloud. But the good thing for, there is the situation the same bad one. Looks like a common behaviour "I/we know it better", so it's better to do nothing instead of moving forward. Btw, you have at least a lot of CI test, but as they fail and nobody takes care about it and ignores them, this all CI checks are complete pointless and just waste of time of everyone. |


I was investigation how to change Wifi upload mechanism, and I found that causing class is still Java 馃憥
So I converted it in advance to Kotlin without changing anything in the logic. I hope that tests will check, if there is something now faulty