atom / symbols-view

Jump to symbols in Atom
MIT License
163 stars 115 forks source link

Fix ctags executable path resolution to support .asar+snapshots in Atom #226

Closed as-cii closed 7 years ago

as-cii commented 7 years ago

Refs: https://github.com/atom/atom/pull/14682.

This pull-request changes symbols-view to allow it to correctly detect the ctags binary when Atom is bundled with both snapshots and .asar archives. This entails detecting whether the file was snapshotted or not: if so, we need to use resourcePath to resolve the package root path, otherwise we can simply traverse the directory tree upward.

Once we know what the absolute path of the package is, we need to detect whether Atom used .asar archives or not. If so, we need to search for ctags in the .unpacked folder where non-source files are stored during the creation of the .asar archive.

/cc: @iolsen