AuroraEditor / Version-Control-Kit

A Version Control Kit that allows Aurora Editor to do everything git related.
https://auroraeditor.github.io/Version-Control-Kit/
GNU Affero General Public License v3.0
9 stars 3 forks source link

Fails on iCloud enabled folders #22

Closed 0xWDG closed 5 months ago

0xWDG commented 5 months ago

Description

Fails to load AE on iCloud enabled folders. Problem must be somewhere in https://github.com/AuroraEditor/Version-Control-Kit/blob/main/Sources/Version-Control/Base/Core/GitShell.swift#L34-L161


working directory doesn't exist.
(
    0   CoreFoundation                      0x000000018dd18540 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x000000018d809eb4 objc_exception_throw + 60
    2   Foundation                          0x000000018ee1b258 -[NSConcreteTask launchWithDictionary:error:] + 4208
    3   Aurora Editor                       0x0000000100a73490 $s15Version_Control8GitShellV3git4args4path4name7optionsAA10IGitResultVSaySSG_10Foundation3URLVSSAA0J16ExecutionOptionsVSgtKF + 1828
    4   Aurora Editor                       0x0000000100a57b94 $s15Version_Control8RevParseV17getRepositoryType12directoryURLAA0fG0O10Foundation0I0V_tKF + 1020
    5   Aurora Editor                       0x0000000100a19c18 $s15Version_Control5CheckV20checkIfProjectIsRepo12workspaceURLSb10Foundation0J0V_tF + 80
    6   Aurora Editor                       0x00000001006f8788 $s12AuroraEditor18SourceControlModelC12workspaceURLAC10Foundation0G0V_tcfc + 1008
    7   Aurora Editor                       0x00000001006f8388 $s12AuroraEditor18SourceControlModelC12workspaceURLAC10Foundation0G0V_tcfC + 56
    8   Aurora Editor                       0x00000001009dc76c $s12AuroraEditor17WorkspaceDocumentC04initC5State33_065D1843F6EB21E67F597C06B178642ELLyy10Foundation3URLVKF + 376
    9   Aurora Editor                       0x00000001009ddf50 $s12AuroraEditor17WorkspaceDocumentC4read4from6ofTypey10Foundation3URLV_SStKF + 380
    10  Aurora Editor                       0x00000001009dee88 $s12AuroraEditor17WorkspaceDocumentC4read4from6ofTypey10Foundation3URLV_SStKFTo + 192
    11  AppKit                              0x00000001916e0bc8 -[NSDocument initWithContentsOfURL:ofType:error:] + 352
    12  AppKit                              0x00000001917324c0 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 204
    13  AppKit                              0x0000000191a090ec __97-[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:]_block_invoke + 96
    14  AppKit                              0x0000000191a08fd4 -[NSDocumentController makeDocumentWithContentsOfURL:alternateContents:ofType:completionHandler:] + 300
    15  AppKit                              0x0000000191a084c4 __102-[NSDocumentController _openDocumentWithContentsOfURL:requestedBySourceApp:display:completionHandler:]_block_invoke + 1140
    16  AppKit                              0x0000000191a07188 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke_4 + 164
    17  AppKit                              0x0000000191a075d0 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.371 + 304
    18  AppKit                              0x0000000191a073e8 __144-[NSDocumentController _coordinateReadingAndGetAlternateContentsForOpeningDocumentAtURL:resolvingSymlinks:thenContinueOnMainThreadWithAccessor:]_block_invoke.367 + 368
    19  AppKit                              0x0000000191a167b0 ___NSMainRunLoopPerformBlockInModes_block_invoke + 44
    20  CoreFoundation                      0x000000018dca3574 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
    21  CoreFoundation                      0x000000018dca3488 __CFRunLoopDoBlocks + 356
    22  CoreFoundation                      0x000000018dca291c __CFRunLoopRun + 2440
    23  CoreFoundation                      0x000000018dca193c CFRunLoopRunSpecific + 608
    24  HIToolbox                           0x000000019826a448 RunCurrentEventLoopInMode + 292
    25  HIToolbox                           0x000000019826a284 ReceiveNextEventCommon + 648
    26  HIToolbox                           0x0000000198269fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
    27  AppKit                              0x0000000191480ed0 _DPSNextEvent + 660
    28  AppKit                              0x0000000191c6beec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
    29  AppKit                              0x000000019147437c -[NSApplication run] + 476
    30  AppKit                              0x000000019144b640 NSApplicationMain + 880
    31  Aurora Editor                       0x00000001000a0b80 main + 12
    32  dyld                                0x000000018d8450e0 start + 2360
)

### To Reproduce

open iCloud enabled folder

### Expected behavior

work

### Version information

N/A

### Additional context

See https://github.com/AuroraEditor/AuroraEditor/pull/638
aurora-care-bear commented 5 months ago

Thanks for submitting a issue! to assign this issue to yourself please comment @aurora-care-bear please assign me