Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit148ce6c

Browse files
committed
handle missing mutagen
1 parentcfb09d6 commit148ce6c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎Coder Desktop/Coder Desktop/FileSync/FileSyncDaemon.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MutagenDaemon: FileSyncDaemon {
1818

1919
privatevarmutagenProcess:Process?
2020
privatevarmutagenPipe:Pipe?
21-
privateletmutagenPath:URL
21+
privateletmutagenPath:URL!
2222
privateletmutagenDataDirectory:URL
2323
privateletmutagenDaemonSocket:URL
2424

@@ -28,10 +28,11 @@ class MutagenDaemon: FileSyncDaemon {
2828

2929
init(){
3030
#if arch(arm64)
31-
mutagenPath=Bundle.main.url(forResource:"mutagen-darwin-arm64", withExtension:nil)!
31+
mutagenPath=Bundle.main.url(forResource:"mutagen-darwin-arm64", withExtension:nil)
3232
#elseif arch(x86_64)
33-
mutagenPath=Bundle.main.url(forResource:"mutagen-darwin-amd64", withExtension:nil)!
33+
mutagenPath=Bundle.main.url(forResource:"mutagen-darwin-amd64", withExtension:nil)
3434
#else
35+
mutagenPath=nil
3536
fatalError("unknown architecture")
3637
#endif
3738
mutagenDataDirectory=FileManager.default.urls(
@@ -41,7 +42,7 @@ class MutagenDaemon: FileSyncDaemon {
4142
mutagenDaemonSocket= mutagenDataDirectory.appending(path:"daemon").appending(path:"daemon.sock")
4243
// It shouldn't be fatal if the app was built without Mutagen embedded,
4344
// but file sync will be unavailable.
44-
if!FileManager.default.fileExists(atPath:mutagenPath.path){
45+
if mutagenPath==nil{
4546
logger.warning("Mutagen not embedded in app, file sync will be unavailable")
4647
state=.unavailable
4748
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp