mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Added 1s wait time to snapshot creation
If the snapshot is created too quickly, a user can make another snapshot with the same epoch time. So this will add a 1 second wait time if the snapshot is done being made really quickly to avoid that.
This commit is contained in:
@@ -131,7 +131,8 @@ class SnapshotsWindow(Adw.Window):
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Error in snapshots_windopw.py: createSnapshot():", e)
|
||||
GLib.idle_add(lambda *_a: self.toast_overlay.add_toast(Adw.Toast.new(_("Could not create snapshot"))))
|
||||
return
|
||||
if(int(time.time()) == epoch):
|
||||
subprocess.run(['sleep', '1s'])
|
||||
|
||||
# `tar -tf filepath` to see the contents of a tar file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user