Skip to content

Commit

Permalink
Fix source file name on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Jan 3, 2024
1 parent 0a89f00 commit 1b554b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package tastyquery

import java.util.Arrays
import java.io.File

final class SourceFile private[tastyquery] (_path: String):
/** The full, though usually relative, path of the file, as stored in TASTy. */
def path: String = _path

/** The last `/`-separated component of the `path`. */
def name: String = path.substring(path.lastIndexOf('/') + 1).nn
def name: String = path.substring(path.lastIndexOf(File.separatorChar) + 1).nn

override def toString(): String = path

Expand Down

0 comments on commit 1b554b8

Please sign in to comment.