mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 05:40:04 +01:00
tools/replay: rmdir, not unlink for directories
And if the directory happens to be nonempty, well, maybe anyother
libinput reply is running so let's ignore that.
Fixes: cdfe34f62a ("replay: use the runtime quirks for our replay quirks")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1330>
This commit is contained in:
parent
f9977dba9c
commit
4b1bae3f8c
1 changed files with 7 additions and 1 deletions
|
|
@ -410,7 +410,13 @@ def main():
|
|||
finally:
|
||||
if quirks_file:
|
||||
quirks_file.unlink()
|
||||
quirks_file.parent.unlink()
|
||||
try:
|
||||
quirks_file.parent.rmdir()
|
||||
except OSError as e:
|
||||
import errno
|
||||
|
||||
if e.errno != errno.ENOTEMPTY:
|
||||
raise e
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue