Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions os/src/Path.scala
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class RelPath private[os] (segments0: Array[String], val ups: Int)
def lastOpt = segments.lastOption
val segments: IndexedSeq[String] = segments0.toIndexedSeq
type ThisType = RelPath
require(ups >= 0)
require(ups >= 0, s"ups must be non-negative, but it is $ups in ${this.toString}")
override protected[this] def make(p: Seq[String], ups: Int): RelPath = {
new RelPath(p.toArray[String], ups + this.ups)
}
Expand All @@ -342,7 +342,7 @@ class RelPath private[os] (segments0: Array[String], val ups: Int)
def toNIO = java.nio.file.Paths.get(toString)

def asSubPath = {
require(ups == 0)
require(ups == 0, s"ups must be zero, but it is $ups in ${this.toString}")
new SubPath(segments0)
}

Expand Down Expand Up @@ -388,7 +388,7 @@ class SubPath private[os] (val segments0: Array[String])
val segments: IndexedSeq[String] = segments0.toIndexedSeq
override type ThisType = SubPath
override protected[this] def make(p: Seq[String], ups: Int): SubPath = {
require(ups == 0)
require(ups == 0, s"ups must be zero, but it is $ups in ${this.toString}")
new SubPath(p.toArray[String])
}

Expand Down
Loading