From 3e64e53cd724773c4616b178fd695091f9a7c71a Mon Sep 17 00:00:00 2001
From: Marco Rodolfi <marco.rodolfi@tuta.io>
Date: Mon, 26 Jun 2023 08:53:41 +0200
Subject: feat: Added detailed message for permission error and clean up
 english language from unused strings.

---
 frontend/src/components/modals/filepicker/index.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'frontend/src/components/modals/filepicker/index.tsx')

diff --git a/frontend/src/components/modals/filepicker/index.tsx b/frontend/src/components/modals/filepicker/index.tsx
index 50931358..ae745c9c 100644
--- a/frontend/src/components/modals/filepicker/index.tsx
+++ b/frontend/src/components/modals/filepicker/index.tsx
@@ -210,6 +210,9 @@ const FilePicker: FunctionComponent<FilePickerProps> = ({
           case theError.match(/\[WinError\s3.*/i)?.input:
             setError(FileErrorTypes.FileNotFound);
             break;
+          case theError.match(/\[Errno\s13.*/i)?.input:
+            setError(FileErrorTypes.PermissionDenied);
+            break;
           default:
             setRawError(theError);
             setError(FileErrorTypes.Unknown);
-- 
cgit v1.2.3

