From 39608eb045b315897eea6f7eed8d708b10adfe77 Mon Sep 17 00:00:00 2001 From: Stephane Geneix Date: Wed, 2 Apr 2025 06:56:32 -0700 Subject: [PATCH] allow syncing files that have never been opened on the remarkable --- rmirro.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rmirro.py b/rmirro.py index 9d5c8d0..ea85c5a 100755 --- a/rmirro.py +++ b/rmirro.py @@ -283,7 +283,11 @@ def last_modified(self): # Returns timestamp at which file was last accessed (opened) def last_accessed(self): - return 0 if self.is_root else int(self.metadata()["lastOpened"]) // 1000 # s + if self.is_root: + return 0 + if "lastOpened" in self.metadata(): + return int(self.metadata()["lastOpened"]) // 1000 # s + return self.last_modified() # Download this file to its corresponding location in the PC directory def download(self):