noklesta/SublimeQuickFileCreator — pull request #9 by twolfson (2014-06-02 03:26:34+00:00)
Title: Fix Windows relative path logic. Fixes #8

As discovered in #8, we have path issues on Windows. The source of the issue is the number-based slicing is running into issues with escaped characters on Windows (e.g. `F:\\`). To resolve this, we are moving away from numbers and onto string replacement.

In this PR:

- Replaced number based slicing with string replacement
- Store `rel_path_start` as the string we were previously computing the length of
- Use `os.path.relpath` to replace relative path base

Tested in Sublime Text 3 on Windows and Sublime Text 2 on Linux

/cc @noklesta