프로세스 판단 문제 수정

This commit is contained in:
Toki 2025-01-26 09:54:06 +09:00
parent e14ff1059a
commit 57fc311729
2 changed files with 4 additions and 3 deletions

View file

@ -8,7 +8,7 @@ import 'package:path/path.dart' as path;
class SchedulerLinux extends SchedulerManager {
@override
String get exePath {
//home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto
// /home/linuxbrew/.linuxbrew/Cellar/oto/0.0.273/bin/oto
var exe = Platform.resolvedExecutable;
final key = '.linuxbrew';
if (exe.contains(key)) {

View file

@ -250,6 +250,7 @@ class SchedulerManager {
}
Future _checkProcess() async {
var oto = Platform.isWindows ? '$appName.exe' : appName;
//process check
var processes = await findProcess(Platform.isWindows
? (isDebug ? 'dart.exe' : '$appName.exe')
@ -257,12 +258,12 @@ class SchedulerManager {
for (var process in processes) {
var processName = process.name;
if (isDebug) {
if (!isDebug) {
if (processName.contains('main.dart scheduler -s')) {
_currentScheduler = process;
}
} else {
if (processName.contains('$appName.exe scheduler -s')) {
if (processName.contains('$oto scheduler -s')) {
_currentScheduler = process;
}
}