Commit b2814827 authored by Gerion Entrup's avatar Gerion Entrup
Browse files

translator: do not allow / in filenames

parent eb785209
......@@ -52,12 +52,13 @@ class BrainzDir(hlfuse.FuseDir):
files = list(self._files.items())
for dbfile in self._query().all():
if not hasattr(self, "_gen_dir"):
filename = self._gen_filename(dbfile).replace('/', '-')
if isinstance(dbfile, Track):
files.append((self._gen_filename(dbfile), _get_file(dbfile.recording)))
files.append((filename, _get_file(dbfile.recording)))
else:
files.append((self._gen_filename(dbfile), _get_file(dbfile)))
files.append((filename, _get_file(dbfile)))
else:
files.append((self._gen_filename(dbfile), self._gen_dir(dbfile)))
files.append((filename, self._gen_dir(dbfile)))
return files
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment