Skip to content

Commit

Permalink
Use os-agnostic check for absolute path
Browse files Browse the repository at this point in the history
Makes the script work under windows, and fixes djsutherland#5.
  • Loading branch information
ast0815 authored Feb 12, 2019
1 parent a1e23be commit 9021b7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arxiv_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def add(path, arcname=None, **kwargs):
if not os.path.exists(dest):
raise OSError("{} doesn't exist!".format(path))
if verbosity >= 2:
print("Adding {}".format(arcname))
print("Adding {}".format(dest))
print(" as {}".format(arcname))
out_tar.add(dest, arcname=arcname, **kwargs)

pat = '#===Dependents(, and related info,)? for {}:\n'.format(base_name)
Expand All @@ -85,7 +86,7 @@ def add(path, arcname=None, **kwargs):
if verbosity >= 3:
print("Processing", dep, "...")

if dep.startswith('/'):
if os.path.isabs(dep):
if pkg_re.search(dep):
add(dep, arcname=os.path.basename(dep))
elif dep.endswith('.tex') and strip_comments:
Expand Down

0 comments on commit 9021b7b

Please sign in to comment.