File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
model/src/main/kotlin/utils Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import java.io.InputStream
2424import org.apache.logging.log4j.kotlin.logger
2525
2626import org.ossreviewtoolkit.model.ArtifactProvenance
27+ import org.ossreviewtoolkit.model.DirectoryProvenance
2728import org.ossreviewtoolkit.model.HashAlgorithm
2829import org.ossreviewtoolkit.model.KnownProvenance
2930import org.ossreviewtoolkit.model.RepositoryProvenance
@@ -81,6 +82,7 @@ private fun KnownProvenance.hash(): String {
8182 val key = when (this ) {
8283 is ArtifactProvenance -> " ${sourceArtifact.url}${sourceArtifact.hash.value} "
8384 is RepositoryProvenance -> " ${vcsInfo.type}${vcsInfo.url}$resolvedRevision "
85+ is DirectoryProvenance -> " "
8486 }
8587
8688 return HashAlgorithm .SHA1 .calculate(key.toByteArray())
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import org.jetbrains.exposed.sql.insert
3636import org.jetbrains.exposed.sql.selectAll
3737
3838import org.ossreviewtoolkit.model.ArtifactProvenance
39+ import org.ossreviewtoolkit.model.DirectoryProvenance
3940import org.ossreviewtoolkit.model.KnownProvenance
4041import org.ossreviewtoolkit.model.RepositoryProvenance
4142import org.ossreviewtoolkit.model.utils.DatabaseUtils.checkDatabaseEncoding
@@ -121,4 +122,5 @@ private fun KnownProvenance.storageKey(): String =
121122 is ArtifactProvenance -> " source-artifact|${sourceArtifact.url} |${sourceArtifact.hash} "
122123 // The trailing "|" is kept for backward compatibility because there used to be an additional parameter.
123124 is RepositoryProvenance -> " vcs|${vcsInfo.type} |${vcsInfo.url} |$resolvedRevision |"
125+ is DirectoryProvenance -> " "
124126 }
You can’t perform that action at this time.
0 commit comments