Use __file__ instead of sys.argv[0]
This commit is contained in:
parent
38110146ab
commit
1f66d74f01
@ -66,7 +66,8 @@ def update_pdfjs(target_version=None):
|
|||||||
url = ('https://github.com/mozilla/pdf.js/releases/download/'
|
url = ('https://github.com/mozilla/pdf.js/releases/download/'
|
||||||
'v{0}/pdfjs-{0}-dist.zip').format(target_version)
|
'v{0}/pdfjs-{0}-dist.zip').format(target_version)
|
||||||
|
|
||||||
os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..', '..'))
|
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||||
|
'..', '..'))
|
||||||
target_path = os.path.join('qutebrowser', '3rdparty', 'pdfjs')
|
target_path = os.path.join('qutebrowser', '3rdparty', 'pdfjs')
|
||||||
print("=> Downloading pdf.js {}".format(version))
|
print("=> Downloading pdf.js {}".format(version))
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user