File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -951,6 +951,8 @@ export class IsomorphicGit extends GitManager {
951
951
filePath : string ,
952
952
stagedChanges = false
953
953
) : Promise < string > {
954
+ const vaultPath = this . getVaultPath ( filePath ) ;
955
+
954
956
const map : WalkerMap = async ( file , [ A ] ) => {
955
957
if ( filePath == file ) {
956
958
const oid = await A ! . oid ( ) ;
@@ -988,20 +990,20 @@ export class IsomorphicGit extends GitManager {
988
990
} ) ;
989
991
990
992
const diff = createPatch (
991
- filePath ,
993
+ vaultPath ,
992
994
headContent ?? "" ,
993
995
stagedContent
994
996
) ;
995
997
return diff ;
996
998
} else {
997
999
let workdirContent : string ;
998
- if ( await app . vault . adapter . exists ( filePath ) ) {
999
- workdirContent = await app . vault . adapter . read ( filePath ) ;
1000
+ if ( await app . vault . adapter . exists ( vaultPath ) ) {
1001
+ workdirContent = await app . vault . adapter . read ( vaultPath ) ;
1000
1002
} else {
1001
1003
workdirContent = "" ;
1002
1004
}
1003
1005
1004
- const diff = createPatch ( filePath , stagedContent , workdirContent ) ;
1006
+ const diff = createPatch ( vaultPath , stagedContent , workdirContent ) ;
1005
1007
return diff ;
1006
1008
}
1007
1009
}
You can’t perform that action at this time.
0 commit comments