mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +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
|
||||
|
||||
init {
|
||||
var parent = (File(oldRemotePath)).parent!!
|
||||
parent = if (parent.endsWith(File.separator)) parent else parent + File.separator
|
||||
newRemotePath = parent + newName
|
||||
var parent = (File(oldRemotePath)).parent ?: throw IllegalArgumentException()
|
||||
if (!parent.endsWith(File.separator)) {
|
||||
parent = parent.plus(File.separator)
|
||||
}
|
||||
newRemotePath = parent.plus(newName)
|
||||
if (isFolder) {
|
||||
newRemotePath.plus(File.separator)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user