Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Path Normalizing with --write-archive #2137

Closed
ingwinlu opened this issue Jan 11, 2014 · 4 comments
Closed

File Path Normalizing with --write-archive #2137

ingwinlu opened this issue Jan 11, 2014 · 4 comments
Labels

Comments

@ingwinlu
Copy link

@ingwinlu ingwinlu commented Jan 11, 2014

Hallo,

atm --write-archive does not normalize / expand a path when used, limiting to absolute paths which is not the same way youtube-dl handles for example the -o template.

The 'cheap' fix in the util.py file:

class locked_file(object):
def init(self, filename, mode, encoding=None):
assert mode in ['r', 'a', 'w']
self.f = io.open(os.path.expanduser(filename), mode, encoding=encoding)
self.mode = mode

@phihag
Copy link
Contributor

@phihag phihag commented Jan 12, 2014

Thanks for the report, fixed.

@phihag phihag closed this in 17093b8 Jan 12, 2014
@ingwinlu
Copy link
Author

@ingwinlu ingwinlu commented Jan 12, 2014

Hi,

i just realized i lied to you, -o does NOT expand ~. I did that manually in my script. You might want to reverse this change then or use expanduser also on the -o option.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 12, 2014

~ is expanded with the -o option, if it doesn't work, that's a bug.

@ingwinlu
Copy link
Author

@ingwinlu ingwinlu commented Jan 12, 2014

Probably was some old relict in my script then,

thank you for your work on youtube-dl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.