postcasio / custom-title

Set your own template for Atom's title bar.
MIT License
27 stars 14 forks source link

Bug with projectPath vs filePath for symlinked directory #9

Open vfonic opened 9 years ago

vfonic commented 9 years ago

Hi,

Thanks for the package!

I've noticed that filePath string is not projectPath + fileName when the project is in symlinked folder.

This is the directory that causes issues: ~/Developer -> ~/OneDrive/Developer

Here's the title template I'm trying to use: <%= fileName + ': ' + filePath.substr(projectPath.length) %>

Here's the output: Expected: index.js:/app/assets/javascripts/index.js Actual: index.js:aproject/app/assets/javascripts/index.js (...aproject is 'OneDrive'.length parent (aka project directory) substring)

I also tried using relativeFilePath, but that one is even worse: ../../../OneDrive/Developer/(...)

I'm not familiar with the internals of Atom, maybe it's Atom issue?