Ported forward additional changes for TaskOutputsBackup.
^KT-49782 Fixed
This commit is contained in:
committed by
teamcity
parent
550f5cf776
commit
699671cb82
+1
-2
@@ -44,7 +44,7 @@ internal class TaskOutputsBackup(
|
|||||||
// property. To avoid snapshot sync collisions, each snapshot output directory has also 'index' as prefix.
|
// property. To avoid snapshot sync collisions, each snapshot output directory has also 'index' as prefix.
|
||||||
outputs.toSortedSet().forEachIndexed { index, outputPath ->
|
outputs.toSortedSet().forEachIndexed { index, outputPath ->
|
||||||
val pathInSnapshot = "$index${File.separator}${outputPath.pathRelativeToBuildDirectory}"
|
val pathInSnapshot = "$index${File.separator}${outputPath.pathRelativeToBuildDirectory}"
|
||||||
if (outputPath.isDirectory) {
|
if (outputPath.isDirectory && Files.list(outputPath.toPath()).use { it.findFirst().isPresent }) {
|
||||||
snapshotsDir
|
snapshotsDir
|
||||||
.map { it.file(pathInSnapshot) }
|
.map { it.file(pathInSnapshot) }
|
||||||
.get()
|
.get()
|
||||||
@@ -121,7 +121,6 @@ internal class TaskOutputsBackup(
|
|||||||
zip.closeEntry()
|
zip.closeEntry()
|
||||||
}
|
}
|
||||||
zip.flush()
|
zip.flush()
|
||||||
zip.close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user