Stop using __dirname to avoid confusing
This commit is contained in:
@@ -100,7 +100,7 @@ const MattermostView = React.createClass({
|
||||
|
||||
osLocale().then((locale) => {
|
||||
if (locale === 'ja_JP') {
|
||||
applyCssFile(__dirname + '/css/jp_fonts.css');
|
||||
applyCssFile(remote.app.getAppPath() + '/css/jp_fonts.css');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ const appLauncher = new AutoLaunch({
|
||||
|
||||
function backToIndex(index) {
|
||||
const target = typeof index === 'undefined' ? 0 : index;
|
||||
const indexURL = remote.getGlobal('isDev') ? 'http://localhost:8080/browser/index.html' : `file://${__dirname}/index.html`;
|
||||
const indexURL = remote.getGlobal('isDev') ? 'http://localhost:8080/browser/index.html' : `file://${remote.app.getAppPath()}/browser/index.html`;
|
||||
remote.getCurrentWindow().loadURL(`${indexURL}?index=${target}`);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user