diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-01-11 13:08:29 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-01-11 13:08:29 +0200 |
commit | e01f4dbf1393a789faaa2f38b53d2effad827e86 (patch) | |
tree | ed8a456d8455a4f2a7d89723269e4352ccfb6dd5 /fix-download-unicode/cfs_access-point.txt | |
parent | 5bece0dd1e8bb97d8ef07908179fb5735d097115 (diff) | |
download | wekan-e01f4dbf1393a789faaa2f38b53d2effad827e86.tar.gz wekan-e01f4dbf1393a789faaa2f38b53d2effad827e86.tar.bz2 wekan-e01f4dbf1393a789faaa2f38b53d2effad827e86.zip |
Change Buffer to Buffer.alloc on Node v12. Try to fix Snap.
Diffstat (limited to 'fix-download-unicode/cfs_access-point.txt')
-rw-r--r-- | fix-download-unicode/cfs_access-point.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fix-download-unicode/cfs_access-point.txt b/fix-download-unicode/cfs_access-point.txt index 8e3359d0..145218df 100644 --- a/fix-download-unicode/cfs_access-point.txt +++ b/fix-download-unicode/cfs_access-point.txt @@ -451,14 +451,14 @@ FS.HTTP.Handlers.Get = function (ref) { if(userAgent.indexOf('msie') >= 0 || userAgent.indexOf('trident') >= 0 || userAgent.indexOf('chrome') >= 0) { ref.filename = encodeURIComponent(ref.filename); } else if(userAgent.indexOf('firefox') >= 0) { - ref.filename = new Buffer(ref.filename).toString('binary'); + ref.filename = new Buffer.alloc(ref.filename).toString('binary'); } else { /* safari*/ - ref.filename = new Buffer(ref.filename).toString('binary'); - } + ref.filename = new Buffer.alloc(ref.filename).toString('binary'); + } } catch (ex){ ref.filename = 'tempfix'; - } + } return originalHandler.call(this, ref); }; // 221 |