From c6714a07cbfd353363e266d3a16d2921d6196532 Mon Sep 17 00:00:00 2001 From: yan Date: Tue, 20 Sep 2016 11:12:46 -0700 Subject: [PATCH] Remove unnecessary ledger path suffixes Fix #4132 Auditors: @mrose17 Test Plan: 1. automated Payments Panel tests should pass 2. start Brave in dev mode. ledger should be reset to original state, but wallet creation should work. 3. in production mode, ledger state should not be changed. --- app/ledger.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/ledger.js b/app/ledger.js index 3de4a09b8fd..ee17169022d 100644 --- a/app/ledger.js +++ b/app/ledger.js @@ -1255,15 +1255,13 @@ var syncWriter = (path, obj, options, cb) => { }) } -const pathSuffix = { development: '-dev', test: '-test' }[process.env.NODE_ENV] || '' - var pathName = (name) => { var parts = path.parse(name) var basePath = process.env.NODE_ENV === 'test' ? path.join(process.env.HOME, '.brave-test-ledger') : app.getPath('userData') - return path.join(basePath, parts.name + pathSuffix + parts.ext) + return path.join(basePath, parts.name + parts.ext) } /**