about summary refs log tree commit diff
path: root/youtube_dl/__main__.py
diff options
context:
space:
mode:
authorAdam Mesha <adam@mesha.org>2013-04-11 07:33:18 +0300
committerAdam Mesha <adam@mesha.org>2013-04-11 08:02:17 +0300
commit87439741894443fcf6e10fce221b4e6d6911b6b8 (patch)
tree0a8157168532c9a69b282c0910650f5c32926e54 /youtube_dl/__main__.py
parent43ff1a347d766bbaa7116f627680e8e74a8760d1 (diff)
downloadyoutube-dl-87439741894443fcf6e10fce221b4e6d6911b6b8.tar.gz
youtube-dl-87439741894443fcf6e10fce221b4e6d6911b6b8.tar.xz
youtube-dl-87439741894443fcf6e10fce221b4e6d6911b6b8.zip
Resolve the symlink if __main__.py is invoke as a symlink.
Diffstat (limited to 'youtube_dl/__main__.py')
-rwxr-xr-xyoutube_dl/__main__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/__main__.py b/youtube_dl/__main__.py
index 7022ea4be..3fe29c91f 100755
--- a/youtube_dl/__main__.py
+++ b/youtube_dl/__main__.py
@@ -9,7 +9,8 @@ import sys
 if __package__ is None and not hasattr(sys, "frozen"):
     # direct call of __main__.py
     import os.path
-    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+    path = os.path.realpath(os.path.abspath(__file__))
+    sys.path.append(os.path.dirname(os.path.dirname(path)))
 
 import youtube_dl