FileNameTooLong exception added for Gfycat and Direct classes
This commit is contained in:
1 parent
e3a97cc495
commit
90f25da666
1 file changed
+11
@@ -233,6 +233,11 @@ class Gfycat:
|
|||||||
|
|
||||||
fileDir = directory / (title+"_"+POST['postId']+POST['postExt'])
|
fileDir = directory / (title+"_"+POST['postId']+POST['postExt'])
|
||||||
tempDir = directory / (title+"_"+POST['postId']+".tmp")
|
tempDir = directory / (title+"_"+POST['postId']+".tmp")
|
||||||
|
try:
|
||||||
|
getFile(fileDir,tempDir,POST['mediaURL'])
|
||||||
|
except FileNameTooLong:
|
||||||
|
fileDir = directory / (POST['postId']+POST['postExt'])
|
||||||
|
tempDir = directory / (POST['postId']+".tmp")
|
||||||
|
|
||||||
getFile(fileDir,tempDir,POST['mediaURL'])
|
getFile(fileDir,tempDir,POST['mediaURL'])
|
||||||
|
|
||||||
@@ -282,4 +287,10 @@ class Direct:
|
|||||||
tempDir = title+"_"+POST['postId']+".tmp"
|
tempDir = title+"_"+POST['postId']+".tmp"
|
||||||
tempDir = directory / tempDir
|
tempDir = directory / tempDir
|
||||||
|
|
||||||
|
try:
|
||||||
|
getFile(fileDir,tempDir,POST['postURL'])
|
||||||
|
except FileNameTooLong:
|
||||||
|
fileDir = directory / (POST['postId']+POST['postExt'])
|
||||||
|
tempDir = directory / (POST['postId']+".tmp")
|
||||||
|
|
||||||
getFile(fileDir,tempDir,POST['postURL'])
|
getFile(fileDir,tempDir,POST['postURL'])
|
||||||
Reference in new issue
Block a user