dschwen / switch-header-source

Quick switching between C/C++ header and source files
MIT License
13 stars 49 forks source link

Project directories with symbolic links break the plugin #23

Closed dschwen closed 6 years ago

dschwen commented 6 years ago
filePath = "/home/daniel/Programs/switch-header-source/test/here/test/test.h"
key = test
entry = ["/home/daniel/Programs/switch-header-source/test/in/here/test/test.cpp", "/home/daniel/Programs/switch-header-source/test/in/here/test/test.h"]

The entry array contains the fully resolved path, while the filePath contains the symbolic links.

Reported by @KuddLim in #22

dschwen commented 6 years ago

I have a fix, but it comes with a side effect. Whenever you open a file from the side bar it will have the path with the symlink, but when switching to the header/source and back you end up with a second tab with that file with the symlink resolved (and hence technically not in the project directory). I'll have to investigate further how to avoid this issue.

dschwen commented 6 years ago

I have just published 0.27.1 which makes the switching work in symlinked project directories. It is not my dream solution, but getting this to work without the slight uglyness will be very hard.