- added a message warning the user that the file is no longer available when it tries to open a file from the recent file, that was moved or deleted

This commit is contained in:
Marius Stanciu
2020-11-13 18:44:05 +02:00
parent 353eed4548
commit 09403a19ab
4 changed files with 32 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import re
import time
import logging
import traceback
import os
import gettext
import appTranslation as fcTranslate
@@ -106,6 +107,10 @@ class ToolPDF(AppTool):
'params': [filename]})
def open_pdf(self, filename):
if not os.path.exists(filename):
self.inform.emit('[ERROR_NOTCL] %s' % _("File no longer available."))
return
short_name = filename.split('/')[-1].split('\\')[-1]
self.parsing_promises.append(short_name)