dashcam 1.3.7-beta → 1.3.9-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,12 @@ import path from 'path';
|
|
|
12
12
|
import os from 'os';
|
|
13
13
|
|
|
14
14
|
// Get process directory for status files
|
|
15
|
-
|
|
15
|
+
// Use a fixed system-wide directory for cross-process communication
|
|
16
|
+
// On Windows: C:\ProgramData\dashcam-cli
|
|
17
|
+
// On Unix: /tmp/dashcam-cli
|
|
18
|
+
const PROCESS_DIR = process.platform === 'win32'
|
|
19
|
+
? path.join('C:', 'ProgramData', 'dashcam-cli')
|
|
20
|
+
: path.join('/tmp', 'dashcam-cli');
|
|
16
21
|
const PID_FILE = path.join(PROCESS_DIR, 'recording.pid');
|
|
17
22
|
const STATUS_FILE = path.join(PROCESS_DIR, 'status.json');
|
|
18
23
|
const RESULT_FILE = path.join(PROCESS_DIR, 'upload-result.json');
|
package/lib/processManager.js
CHANGED
|
@@ -8,8 +8,12 @@ import { logger } from './logger.js';
|
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = path.dirname(__filename);
|
|
10
10
|
|
|
11
|
-
// Use a fixed
|
|
12
|
-
|
|
11
|
+
// Use a fixed system-wide directory for cross-process communication
|
|
12
|
+
// On Windows: C:\ProgramData\dashcam-cli
|
|
13
|
+
// On Unix: /tmp/dashcam-cli
|
|
14
|
+
const PROCESS_DIR = process.platform === 'win32'
|
|
15
|
+
? path.join('C:', 'ProgramData', 'dashcam-cli')
|
|
16
|
+
: path.join('/tmp', 'dashcam-cli');
|
|
13
17
|
const PID_FILE = path.join(PROCESS_DIR, 'recording.pid');
|
|
14
18
|
const STATUS_FILE = path.join(PROCESS_DIR, 'status.json');
|
|
15
19
|
const RESULT_FILE = path.join(PROCESS_DIR, 'upload-result.json');
|