Fixed file delete not deleting the file using the repo path

This commit is contained in:
Abdelilah El Aissaoui 2022-02-02 20:23:04 +01:00
parent 1dca2dfd51
commit 13684e4f90

View File

@ -140,10 +140,10 @@ class StatusViewModel @Inject constructor(
return@safeProcessing RefreshType.ALL_DATA
}
fun deleteFile(diffEntry: DiffEntry) = tabState.runOperation {
fun deleteFile(diffEntry: DiffEntry) = tabState.runOperation { git ->
val path = diffEntry.newPath
val fileToDelete = File(path)
val fileToDelete = File(git.repository.directory.parent, path)
fileToDelete.delete()