JS: fix building stubs for JS library that contains classes in default package

This commit is contained in:
Alexey Andreev
2016-11-23 17:57:56 +03:00
parent efeccd0929
commit 20669c1b97
2 changed files with 1 additions and 10 deletions
@@ -57,7 +57,7 @@ object JsMetaFileUtils {
private fun getPackageFqName(relPath: String): FqName {
val pathToFile = relPath.substringAfter(VfsUtilCore.VFS_SEPARATOR_CHAR)
if (isDefaultPackageMetafile(pathToFile)) return FqName.ROOT
if (isDefaultPackageMetafile(pathToFile) || !pathToFile.contains(VfsUtilCore.VFS_SEPARATOR_CHAR)) return FqName.ROOT
val name = pathToFile.substringBeforeLast(VfsUtilCore.VFS_SEPARATOR_CHAR)
return FqName(name.replace(VfsUtilCore.VFS_SEPARATOR_CHAR, '.'))