Limit length of filenames (#311)
* Limit length of filenames If whipper generated filenames are longer thant the maximum value supported by the filesystem, the I/O operations are going to fail. With this commit filenames which may be too long are truncated to the maximum allowable length. Fixes #197.
This commit is contained in:
@@ -481,8 +481,8 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
|
||||
except IOError as e:
|
||||
if errno.ENAMETOOLONG != e.errno:
|
||||
raise
|
||||
path = common.shrinkPath(path)
|
||||
tmpoutpath = path + u'.part'
|
||||
path = common.truncate_filename(common.shrinkPath(path))
|
||||
tmpoutpath = common.truncate_filename(path + u'.part')
|
||||
open(tmpoutpath, 'wb').close()
|
||||
self._tmppath = tmpoutpath
|
||||
self.path = path
|
||||
|
||||
Reference in New Issue
Block a user