Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Exception is thrown if NTFS partition is mounted with 'windows_names' option and a directory or file name in the output template ends with a dot #9560
Comments
|
As a side note, from http://linux.die.net/man/8/mount.ntfs-3g:
|
|
Oh |
Before submitting an issue make sure you have:
What is the purpose of your issue?
Log output
Description of the issue
NTFS partitions mounted with the
windows_namesoption disallows files and directories from containing<>:"/\|?*and from ending with a.. I believe the former is taken care of by youtube-dl, but the latter is not. Python will throw aERROR: unable to create directory [Errno 22] Invalid argumentexception when you try to create a directory ending with a..In my example, I try to download a playlist named
Singles/Misc.with the output template%(uploader)s/%(playlist)s/%(playlist_index)s. %(title)s-%(id)s.%(ext)s. If the playlist's name, and I presume the uploader's name, ends with.the exception will be thrown.Example
/etc/fstabfor mounting an NTFS partition with thewindows_namesoption:Suggested solution
I see three main alternatives, although if any of you find a more creative solution then please let me know:
windows_namesoption and follow Windows filename compatibility if that is the case.--restrict-filenamesoption also replace dots from the end of directory names and filenames.NOTE: Any solution would need to replace an arbitrary amount of dots from the end of the file and directory names, as their names could contain multiple dots:
playlist name...