tevd: failed delete will return status code 1

This commit is contained in:
minjaesong
2022-12-20 22:46:45 +09:00
parent 8483439a79
commit 6fb947dd67

View File

@@ -204,7 +204,11 @@ class TevdDiskDrive(private val vm: VM, private val driveNum: Int, private val t
return
}
try {
file.delete()
val successful = file.delete()
if (!successful) {
statusCode.set(TestDiskDrive.STATE_CODE_OPERATION_FAILED)
return
}
printdbg("Notifying disk commit (file deleted)")
notifyDiskCommit()
}