Skip to content

Commit e37616c

Browse files
Merge pull request #159 from Accedia/reverted-to-C-directiory
Reverted to c directiory
2 parents 8973e4d + 483bc9a commit e37616c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

electron-app/src/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ import { isAppDev, isDev } from './utils/is_dev';
1313
import log from 'electron-log';
1414
import { FirebaseService, SessionStatus } from './utils/firebase';
1515
import mitchell_importer from './utils/mitchell_importer';
16-
import os from 'os';
1716
import { spawn } from 'child_process';
1817

1918
const INPUT_SPEED_STORAGE_KEY = 'inputSpeed';
20-
const downloadFolderPath = path.join(os.homedir(), 'Downloads', 'FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
2119

2220
if (isDev() && isAppDev(app)) {
2321
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -64,14 +62,14 @@ class Main {
6462
const url = getCustomProtocolUrl(argv);
6563
if (argv.some((url) => url.includes('openVBS'))) {
6664
try {
67-
const bat = spawn(downloadFolderPath, [], { windowsHide: true });
65+
const bat = spawn('C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat', [], { windowsHide: true });
6866
bat.on('close', (code) => {
6967
log.info(`Child process exited with code ${code}`);
7068
app.quit();
7169
});
7270
return;
7371
} catch (error) {
74-
dialog.showErrorBox('Error', 'The specified file was not found: Downloads\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
72+
dialog.showErrorBox('Error', 'The specified file was not found: C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
7573
}
7674
}
7775
this.finalUrl = url;

electron-app/src/utils/window_manager.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ import { FirebaseService } from './firebase';
1111
import { extractSessionIdFromUrl } from './extract_sessionid_from_url';
1212
import mitchell_importer from './mitchell_importer';
1313
import log from 'electron-log';
14-
import os from 'os';
1514
import { spawn } from 'child_process';
1615

17-
const downloadFolderPath = path.join(os.homedir(), 'Downloads', 'FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
18-
1916
type MaybeBrowserWindow = BrowserWindow | null;
2017

2118
class WindowManager {
@@ -79,14 +76,14 @@ class WindowManager {
7976
console.log('VBS URL', process.argv);
8077
if (shouldOpenVBS) {
8178
try {
82-
const bat = spawn(downloadFolderPath, [], { windowsHide: true });
79+
const bat = spawn('C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat', [], { windowsHide: true });
8380
bat.on('close', (code) => {
8481
console.log(`Child process exited with code ${code}`);
8582
app.quit();
8683
});
8784
return;
8885
} catch (error) {
89-
dialog.showErrorBox('Error', 'The specified file was not found: Downloads\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
86+
dialog.showErrorBox('Error', 'The specified file was not found: C:\\FIT-Mitchell-Cloud-RO-Import-Tool\\FIT.bat');
9087
}
9188
}
9289
log.info('loading has started this is on show');

0 commit comments

Comments
 (0)