@@ -210,7 +210,9 @@ export function addCommands(
210
210
'Create an empty Git repository or reinitialize an existing one'
211
211
) ,
212
212
execute : async ( ) => {
213
- const currentPath = fileBrowserModel . path ;
213
+ const currentPath = app . serviceManager . contents . localPath (
214
+ fileBrowserModel . path
215
+ ) ;
214
216
const result = await showDialog ( {
215
217
title : trans . __ ( 'Initialize a Repository' ) ,
216
218
body : trans . __ ( 'Do you really want to make this directory a Git Repo?' ) ,
@@ -1314,7 +1316,9 @@ export function addCommands(
1314
1316
change . newValue ?. last_modified ?? 0
1315
1317
) . valueOf ( ) ;
1316
1318
if (
1317
- change . newValue ?. path === fullPath &&
1319
+ app . serviceManager . contents . localPath (
1320
+ change . newValue ?. path ?? ''
1321
+ ) === fullPath &&
1318
1322
model . challenger . updateAt !== updateAt
1319
1323
) {
1320
1324
model . challenger = {
@@ -1794,6 +1798,7 @@ export function addHistoryMenuItems(
1794
1798
export function addFileBrowserContextMenu (
1795
1799
model : IGitExtension ,
1796
1800
filebrowser : FileBrowser ,
1801
+ contents : Contents . IManager ,
1797
1802
contextMenu : ContextMenuSvg ,
1798
1803
trans : TranslationBundle
1799
1804
) : void {
@@ -1809,11 +1814,12 @@ export function addFileBrowserContextMenu(
1809
1814
const statuses = new Set < Git . Status > (
1810
1815
// @ts -expect-error file cannot be undefined or null
1811
1816
items
1812
- . map ( item =>
1813
- model . pathRepository === null
1817
+ . map ( item => {
1818
+ const itemPath = contents . localPath ( item . path ) ;
1819
+ return model . pathRepository === null
1814
1820
? undefined
1815
- : model . getFile ( item . path ) ?. status
1816
- )
1821
+ : model . getFile ( itemPath ) ?. status ;
1822
+ } )
1817
1823
. filter ( status => typeof status !== 'undefined' )
1818
1824
) ;
1819
1825
0 commit comments