1
0
Fork 0
mirror of synced 2024-06-26 10:00:20 +12:00

Fixed the long file name bug

This commit is contained in:
Ali Parlakci 2018-07-10 01:44:28 +03:00
parent 4e8e59f527
commit 2e15dacaeb

View file

@ -308,8 +308,14 @@ class Self:
if Path.is_file(fileDir):
raise FileAlreadyExistsError
try:
self.writeToFile(fileDir,post)
except FileNotFoundError:
fileDir = post['postId']+".md"
fileDir = directory / fileDir
self.writeToFile(fileDir,post)
self.writeToFile(fileDir,post)
@staticmethod
def writeToFile(directory,post):