Skip to content

Commit 708495b

Browse files
authored
Merge pull request #5 from patricklx/fix-null-ptr
fix null pointer exception
2 parents 2892e56 + d587dba commit 708495b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/wsl/symlinks/vfs/WslVirtualFileSystem.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class WslVirtualFileSystem: LocalFileSystemImpl() {
256256
val file = getRealVirtualFile(vfile)
257257
var attributes = super.getAttributes(file)
258258

259-
if (attributes != null && attributes.type == null && this.getWslSymlinksProviders(file).isWslSymlink(file)) {
259+
if (attributes != null && attributes.type == null && file.isFromWSL() && this.getWslSymlinksProviders(file).isWslSymlink(file)) {
260260
val resolved = this.resolveSymLink(file)?.let { resPath ->
261261
return@let object : StubVirtualFile() {
262262
override fun getPath(): String {

0 commit comments

Comments
 (0)