mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Merge pull request #583 from eikek/fix-baseurl-setting
Render baseurl without trailing slash
This commit is contained in:
@ -49,6 +49,12 @@ case class LenientUri(
|
||||
def withFragment(f: String): LenientUri =
|
||||
copy(fragment = Some(f))
|
||||
|
||||
def rootPathToEmpty: LenientUri =
|
||||
path match {
|
||||
case LenientUri.RootPath => copy(path = LenientUri.EmptyPath)
|
||||
case _ => this
|
||||
}
|
||||
|
||||
def toJavaUrl: Either[String, URL] =
|
||||
Either.catchNonFatal(new URL(asString)).left.map(_.getMessage)
|
||||
|
||||
|
Reference in New Issue
Block a user