Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rmirro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down