randy3k / AutomaticPackageReloader

Automatically reload submodules while developing a Sublime Text package.
MIT License
38 stars 13 forks source link

add fallback for guessing package name from file name #3

Closed gwenzek closed 7 years ago

gwenzek commented 7 years ago

I usually simlink projects into my Packages folder when I'm working on them, and wasn't able to use the "reload" command because the path was expanded.

I therefore added a fallback to the method that guess the package name from the filename.

The behavior should be the same as before for users for who the plugin was working.

If you have a better idea for the "extract_from_file_name" function name, or if you want me to inline it, please tell me.

randy3k commented 7 years ago

I have made a slight modification so that the detection is more robust. Let me know if it works for you.

gwenzek commented 7 years ago

Thanks, it works nicely.