File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -750,15 +750,22 @@ export class CommandCenter {
750750
751751 if ( uri !== undefined ) {
752752 // Launch desktop client if currently in web
753+ let target = `${ env . uriScheme } ://vscode.git/clone?url=${ encodeURIComponent ( uri ) } ` ;
753754 if ( env . uiKind === UIKind . Web ) {
754- let target = `${ env . uriScheme } ://vscode.git/clone?url=${ encodeURIComponent ( uri ) } ` ;
755755 if ( ref !== undefined ) {
756756 target += `&ref=${ encodeURIComponent ( ref ) } ` ;
757757 }
758758 return Uri . parse ( target ) ;
759759 }
760760
761- // If already in desktop client, directly clone
761+ // If already in desktop client but in a remote window, we need to force a new window
762+ // so that the git extension can access the local filesystem for cloning
763+ if ( env . remoteName !== undefined ) {
764+ target += `&windowId=_blank` ;
765+ return Uri . parse ( target ) ;
766+ }
767+
768+ // Otherwise, directly clone
762769 void this . clone ( uri , undefined , { ref : ref } ) ;
763770 }
764771 }
You can’t perform that action at this time.
0 commit comments