Folder names must not end in dots (bug 600)
On Windows, a folder name like "Abc..." is saved as "Abc", and trying to create such a folder name works, but the trailing dots are removed. When trying to download files to such a folder (while gPodder still believes the folder has dots at the end), this won't work. To fix this bug, don't allow trailing dots in the folder name of podcasts by stripping them. Thanks to Yves for reporting this bug.
This commit is contained in:
parent
bd2beaeaab
commit
930461bc65
|
@ -516,7 +516,11 @@ class PodcastChannel(PodcastModelObject):
|
|||
return self.db.load_episodes(self, factory=self.episode_factory)
|
||||
|
||||
def find_unique_folder_name(self, foldername):
|
||||
current_try = util.sanitize_filename(foldername, self.MAX_FOLDERNAME_LENGTH)
|
||||
# Remove trailing dots to avoid errors on Windows (bug 600)
|
||||
foldername = foldername.strip().rstrip('.')
|
||||
|
||||
current_try = util.sanitize_filename(foldername, \
|
||||
self.MAX_FOLDERNAME_LENGTH)
|
||||
next_try_id = 2
|
||||
|
||||
while True:
|
||||
|
|
Loading…
Reference in a new issue