mirror of https://github.com/sbt/sbt.git
source compatibility of ClasspathUtilities.isArchive for sbt-assembly
default parameters and eta-expansion don't interact well
This commit is contained in:
parent
a3defe2556
commit
39f6456a81
|
|
@ -74,7 +74,9 @@ object ClasspathUtilities
|
|||
private[sbt] def printSource(c: Class[_]) =
|
||||
println(c.getName + " loader=" +c.getClassLoader + " location=" + IO.classLocationFile(c))
|
||||
|
||||
def isArchive(file: File, contentFallback: Boolean = false): Boolean =
|
||||
def isArchive(file: File): Boolean = isArchive(file, contentFallback = false)
|
||||
|
||||
def isArchive(file: File, contentFallback: Boolean): Boolean =
|
||||
file.isFile && (isArchiveName(file.getName) || (contentFallback && hasZipContent(file)))
|
||||
|
||||
def isArchiveName(fileName: String) = fileName.endsWith(".jar") || fileName.endsWith(".zip")
|
||||
|
|
|
|||
Loading…
Reference in New Issue