소스 검색

[update] Fix updating via symlinks (closes #23991)

tags/2020.02.16
Sergey M․ 4 년 전
부모
커밋
bfe2b8cf2a
No known key found for this signature in database GPG 키 ID: 2C393E0F18A9236D
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -0
      youtube_dl/compat.py
  2. +4
    -1
      youtube_dl/update.py

+ 1
- 0
youtube_dl/compat.py 파일 보기

@@ -3009,6 +3009,7 @@ __all__ = [
'compat_os_name',
'compat_parse_qs',
'compat_print',
'compat_realpath',
'compat_setenv',
'compat_shlex_quote',
'compat_shlex_split',


+ 4
- 1
youtube_dl/update.py 파일 보기

@@ -9,6 +9,7 @@ import subprocess
import sys
from zipimport import zipimporter

from .compat import compat_realpath
from .utils import encode_compat_str

from .version import __version__
@@ -84,7 +85,9 @@ def update_self(to_screen, verbose, opener):
print_notes(to_screen, versions_info['versions'])

# sys.executable is set to the full pathname of the exe-file for py2exe
filename = sys.executable if hasattr(sys, 'frozen') else sys.argv[0]
# though symlinks are not followed so that we need to do this manually
# with help of realpath
filename = compat_realpath(sys.executable if hasattr(sys, 'frozen') else sys.argv[0])

if not os.access(filename, os.W_OK):
to_screen('ERROR: no write permissions on %s' % filename)


불러오는 중...
취소
저장