aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2021-05-02 16:12:41 +0200
committerPatrick Brunschwig <[email protected]>2021-05-02 16:12:41 +0200
commit2820b5492f4d4cea918e8f622cbe3ddda4d0816a (patch)
tree65e645ff84691ccc5802e072ba165962692062ce
parentacb7c4d32b60828424d310283f49c4fb6f3315c1 (diff)
downloadenigmail-2820b5492f4d4cea918e8f622cbe3ddda4d0816a.tar.gz
enigmail-2820b5492f4d4cea918e8f622cbe3ddda4d0816a.tar.bz2
enigmail-2820b5492f4d4cea918e8f622cbe3ddda4d0816a.zip
log invalid path
-rw-r--r--package/files.jsm12
1 files changed, 9 insertions, 3 deletions
diff --git a/package/files.jsm b/package/files.jsm
index 4e7fb11e..7bca2a90 100644
--- a/package/files.jsm
+++ b/package/files.jsm
@@ -160,10 +160,16 @@ var EnigmailFiles = {
// uses persistentDescriptor in case that initWithPath fails
// (seems to happen frequently with UTF-8 characters in path names)
initPath: function(localFileObj, pathStr) {
- localFileObj.initWithPath(pathStr);
+ try {
+ localFileObj.initWithPath(pathStr);
- if (!localFileObj.exists()) {
- localFileObj.persistentDescriptor = pathStr;
+ if (!localFileObj.exists()) {
+ localFileObj.persistentDescriptor = pathStr;
+ }
+ }
+ catch(ex) {
+ lazyLog().ERROR(`files.jsm: initPath: invalid path: '${pathStr}'\n`);
+ throw ex;
}
},