Skip to content

Commit 8849013

Browse files
committed
Valid URL for VirtualDirectory classpath
1 parent 23e794a commit 8849013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/scala/tools/nsc/classpath/VirtualDirectoryClassPath.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case class VirtualDirectoryClassPath(dir: VirtualDirectory) extends ClassPath wi
3535
def isPackage(f: AbstractFile): Boolean = f.isPackage
3636

3737
// mimic the behavior of the old nsc.util.DirectoryClassPath
38-
def asURLs: Seq[URL] = Seq(new URL(dir.name))
38+
def asURLs: Seq[URL] = Seq(new URL("file://_VIRTUAL_/" + dir.name))
3939
def asClassPathStrings: Seq[String] = Seq(dir.path)
4040

4141
override def findClass(className: String): Option[ClassRepresentation] = findClassFile(className) map ClassFileEntryImpl

0 commit comments

Comments
 (0)