Skip to content

Commit

Permalink
fix: get directory size feature not working
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksey-hoffman committed Aug 16, 2021
1 parent 955366e commit 6281a45
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/appPaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ const storageFiles = {
}
}

function get (relativePath) {
return process.env.NODE_ENV === 'production'
? PATH.join(__dirname, relativePath)
: PATH.join(relativePath)
}

const storageDirectories = {
appStorage,
appStorageMedia,
Expand All @@ -134,6 +140,7 @@ const storageDirectories = {
}

const appPaths = {
get,
storageFiles,
storageDirectories,
resources,
Expand Down
2 changes: 1 addition & 1 deletion src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -5764,7 +5764,7 @@ export default new Vuex.Store({
}, task.props.options.timeout)
}
store.state.childProcesses.directorySize = childProcess.fork(
PATH.resolve('./src/processes/directorySizeProcess.js'),
appPaths.get('./src/processes/directorySizeProcess.js'),
{ silent: true }
)
store.state.childProcesses.directorySize.on('message', data => {
Expand Down
8 changes: 7 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ module.exports = {
'./src/utils/search.js'
],
// Exclude dependencies from the output bundles
externals: ['chokidar', 'fsevents', 'xxhash-addon', 'fswin'],
externals: [
'chokidar',
'fsevents',
'xxhash-addon',
'fswin',
'trammel'
],
// Webpack config for electron renderer process only
chainWebpackRendererProcess: (config) => {
config.plugin('define').tap(args => {
Expand Down

0 comments on commit 6281a45

Please sign in to comment.