mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Apply code review suggestions
This commit is contained in:
parent
6f33dca672
commit
f7645c1648
@ -53,9 +53,11 @@ class RenameRemoteFileOperation(
|
|||||||
private var newRemotePath: String
|
private var newRemotePath: String
|
||||||
|
|
||||||
init {
|
init {
|
||||||
var parent = (File(oldRemotePath)).parent!!
|
var parent = (File(oldRemotePath)).parent ?: throw IllegalArgumentException()
|
||||||
parent = if (parent.endsWith(File.separator)) parent else parent + File.separator
|
if (!parent.endsWith(File.separator)) {
|
||||||
newRemotePath = parent + newName
|
parent = parent.plus(File.separator)
|
||||||
|
}
|
||||||
|
newRemotePath = parent.plus(newName)
|
||||||
if (isFolder) {
|
if (isFolder) {
|
||||||
newRemotePath.plus(File.separator)
|
newRemotePath.plus(File.separator)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user