GenericMappingTools / sphinx_gmt

Sphinx extensions for GMT
https://www.generic-mapping-tools.org/sphinx_gmt
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Fix checking path starting with '/' on Windows #16

Closed seisman closed 5 years ago

seisman commented 5 years ago
.. gmt-plot:: path/to/file.sh

can read GMT scripts from a file. If the script path starts with /, it is relative to the top source directory or relative to configuration variable gmtplot_basedir (if defined).

Path.is_absolute() can check if a path is absolute. On UNIX, it's the same as checking if it starts with /, but on Windows it fails.

This PR fixes the issue.