Skip to content

Commit

Permalink
Merge branch 'feature/IJMP-1731-copy-display-path' into 'release/v2.1.0'
Browse files Browse the repository at this point in the history
IJMP-1731 Using destination path from file attributes as a destination label instead of a file name

See merge request ijmp/for-mainframe!603
  • Loading branch information
Uladzislau Lailo committed Oct 22, 2024
2 parents 0dfb055 + c72c31d commit 97be3b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package eu.ibagroup.formainframe.dataops.operations.mover
import com.intellij.openapi.progress.ProgressIndicator
import eu.ibagroup.formainframe.config.connect.ConnectionConfig
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
import eu.ibagroup.formainframe.dataops.attributes.Requester
import eu.ibagroup.formainframe.dataops.exceptions.CallException
import eu.ibagroup.formainframe.dataops.operations.DeleteOperation
Expand Down Expand Up @@ -63,7 +64,8 @@ abstract class DefaultFileMover(protected val dataOpsManager: DataOpsManager) :
}.mapCatching {
val operationMessage = if (operation.isMove) "move" else "copy"
if (!it.isSuccessful) {
throw CallException(it, "Cannot $operationMessage ${operation.source.name} to ${operation.destination.name}")
val dst = if (operation.destinationAttributes is RemoteUssAttributes) operation.destinationAttributes.path else operation.destination.name
throw CallException(it, "Cannot $operationMessage ${operation.source.name} to $dst")
} else {
it
}
Expand Down

0 comments on commit 97be3b2

Please sign in to comment.