mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 09:38:07 +08:00
fix(attachments): Add warning for ENOSPC as well
This commit is contained in:
parent
1e0717b801
commit
2007ddf0ba
1 changed files with 7 additions and 1 deletions
|
@ -298,11 +298,17 @@ FileDownloadStore = Reflux.createStore
|
|||
buttons: ["OK"]
|
||||
|
||||
_catchFSErrors: (error) ->
|
||||
message = null
|
||||
if error.code in ['EPERM', 'EMFILE', 'EACCES']
|
||||
message = "N1 could not save an attachment. Check that permissions are set correctly and try restarting N1 if the issue persists."
|
||||
if error.code in ['ENOSPC']
|
||||
message = "N1 could not save an attachment because you have run out of disk space."
|
||||
|
||||
if message
|
||||
remote.dialog.showMessageBox
|
||||
type: 'warning'
|
||||
message: "Download Failed"
|
||||
detail: "N1 could not save an attachment. Check that permissions are set correctly and that you have enough disk space.\n\n#{error.message}"
|
||||
detail: "#{message}\n\n#{error.message}"
|
||||
buttons: ["OK"]
|
||||
return Promise.resolve()
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue