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
24
24
import org.apache.logging.log4j.kotlin.logger
25
25
26
26
import org.ossreviewtoolkit.model.ArtifactProvenance
27
+ import org.ossreviewtoolkit.model.DirectoryProvenance
27
28
import org.ossreviewtoolkit.model.HashAlgorithm
28
29
import org.ossreviewtoolkit.model.KnownProvenance
29
30
import org.ossreviewtoolkit.model.RepositoryProvenance
@@ -81,6 +82,7 @@ private fun KnownProvenance.hash(): String {
81
82
val key = when (this ) {
82
83
is ArtifactProvenance -> " ${sourceArtifact.url}${sourceArtifact.hash.value} "
83
84
is RepositoryProvenance -> " ${vcsInfo.type}${vcsInfo.url}$resolvedRevision "
85
+ is DirectoryProvenance -> " "
84
86
}
85
87
86
88
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
36
36
import org.jetbrains.exposed.sql.selectAll
37
37
38
38
import org.ossreviewtoolkit.model.ArtifactProvenance
39
+ import org.ossreviewtoolkit.model.DirectoryProvenance
39
40
import org.ossreviewtoolkit.model.KnownProvenance
40
41
import org.ossreviewtoolkit.model.RepositoryProvenance
41
42
import org.ossreviewtoolkit.model.utils.DatabaseUtils.checkDatabaseEncoding
@@ -121,4 +122,5 @@ private fun KnownProvenance.storageKey(): String =
121
122
is ArtifactProvenance -> " source-artifact|${sourceArtifact.url} |${sourceArtifact.hash} "
122
123
// The trailing "|" is kept for backward compatibility because there used to be an additional parameter.
123
124
is RepositoryProvenance -> " vcs|${vcsInfo.type} |${vcsInfo.url} |$resolvedRevision |"
125
+ is DirectoryProvenance -> " "
124
126
}
You can’t perform that action at this time.
0 commit comments