Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
bfe2b8cf
Unverified
Commit
bfe2b8cf
authored
Feb 08, 2020
by
Sergey M․
Browse files
[update] Fix updating via symlinks (closes #23991)
parent
82fea5b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
youtube_dl/compat.py
youtube_dl/compat.py
+1
-0
youtube_dl/update.py
youtube_dl/update.py
+4
-1
No files found.
youtube_dl/compat.py
View file @
bfe2b8cf
...
...
@@ -3009,6 +3009,7 @@ __all__ = [
'compat_os_name'
,
'compat_parse_qs'
,
'compat_print'
,
'compat_realpath'
,
'compat_setenv'
,
'compat_shlex_quote'
,
'compat_shlex_split'
,
...
...
youtube_dl/update.py
View file @
bfe2b8cf
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment