Compare commits
2 Commits
8433951546
...
dda0daaee5
| Author | SHA1 | Date | |
|---|---|---|---|
| dda0daaee5 | |||
| 7a1e1f0be2 |
5
main.py
5
main.py
@@ -190,6 +190,9 @@ def unmountDisk(state: AppState) -> None:
|
||||
else:
|
||||
state.diskState = "disconnected"
|
||||
else:
|
||||
print("force unmounting")
|
||||
subprocess.run(["fuser", "-km", f"/mnt/{state.config.diskSerial}"], check=False)
|
||||
subprocess.run(["sync"], check=False)
|
||||
subprocess.run(
|
||||
[
|
||||
"umount",
|
||||
@@ -256,6 +259,8 @@ def main() -> None:
|
||||
state.stopEvent.set()
|
||||
if state.diskState == "connected":
|
||||
unmountDisk(state)
|
||||
if state.failedUmount:
|
||||
unmountDisk(state)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user