Merge pull request #4937 from eatkins/miscellaneous-fixups

Miscellaneous fixups
This commit is contained in:
Ethan Atkins 2019-08-08 21:47:33 -07:00 committed by GitHub
commit 5b5f239962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ object SysProp {
def closeClassLoaders: Boolean = getOrTrue("sbt.classloader.close")
def fileCacheSize: Long =
SizeParser(System.getProperty("sbt.file.cache.size", "128M")).getOrElse(128 * 1024 * 1024)
SizeParser(System.getProperty("sbt.file.cache.size", "128M")).getOrElse(128L * 1024 * 1024)
def supershell: Boolean = color && getOrTrue("sbt.supershell")
def supershellSleep: Long = long("sbt.supershell.sleep", 100L)

View File

@ -60,7 +60,7 @@ object Scripted {
// Grabs the filenames from a given test group in the current page definition.
def pagedFilenames(group: String, page: ScriptedTestPage): Seq[String] = {
val files = pairMap(group).toSeq.sortBy(_.toLowerCase)
val pageSize = files.size / page.total
val pageSize = if (page.total == 0) files.size else files.size / page.total
// The last page may loose some values, so we explicitly keep them
val dropped = files.drop(pageSize * (page.page - 1))
if (page.page == page.total) dropped