Skip to content

Commit

Permalink
do not use backslash in import path (affects Windows only). fixes int…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbolotov committed May 14, 2023
1 parent 7762eae commit a02c8a1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import me.serce.solidity.lang.psi.SolPragmaDirective
import me.serce.solidity.lang.psi.SolPsiFactory
import me.serce.solidity.nullIfError
import java.awt.BorderLayout
import java.io.File
import java.nio.file.Paths
import javax.swing.Icon
import javax.swing.JPanel
Expand Down Expand Up @@ -126,7 +127,7 @@ class ImportFileAction(

fun buildImportPath(source: VirtualFile, destination: VirtualFile): String {
return Paths.get(source.path).parent.relativize(Paths.get(destination.path)).toString().let {
val separator = "/"
val separator = File.separator
when {
it.contains("node_modules$separator") -> {
val idx = it.indexOf("node_modules$separator")
Expand Down

0 comments on commit a02c8a1

Please sign in to comment.