Permalink
Browse files

model: Limit filenames to 120 characters for eCryptFS (bug 1898)

  • Loading branch information...
1 parent c713915 commit cc6ea467bb4119c3e58275320e343eb6f027de35 @thp thp committed Jul 1, 2015
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/gpodder/model.py
@@ -133,7 +133,12 @@ def create_from_dict(cls, d, *args):
class PodcastEpisode(PodcastModelObject):
"""holds data for one object in a channel"""
- MAX_FILENAME_LENGTH = 200
+ # In theory, Linux can have 255 bytes (not characters!) in a filename, but
+ # filesystems like eCryptFS store metadata in the filename, making the
+ # effective number of characters less than that. eCryptFS recommends
+ # 140 chars, we use 120 here (140 - len(extension) - len(".partial")).
+ # References: gPodder bug 1898, http://unix.stackexchange.com/a/32834
+ MAX_FILENAME_LENGTH = 120
__slots__ = schema.EpisodeColumns

0 comments on commit cc6ea46

Please sign in to comment.