Skip to content

Commit

Permalink
Merge pull request #123 from sscherfke/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco authored Jun 29, 2023
2 parents b869233 + f00063b commit fbf0362
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libarchive/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def atime(self, value):
seconds, fraction = math.modf(value)
self.set_atime(int(seconds), int(fraction * 1_000_000_000))

def set_atime(self, timestamp_sec, timestamp_nsec):
def set_atime(self, timestamp_sec, timestamp_nsec=0):
"Kept for backward compatibility. `entry.atime = ...` is supported now."
return ffi.entry_set_atime(self._entry_p, timestamp_sec, timestamp_nsec)

Expand All @@ -235,7 +235,7 @@ def mtime(self, value):
seconds, fraction = math.modf(value)
self.set_mtime(int(seconds), int(fraction * 1_000_000_000))

def set_mtime(self, timestamp_sec, timestamp_nsec):
def set_mtime(self, timestamp_sec, timestamp_nsec=0):
"Kept for backward compatibility. `entry.mtime = ...` is supported now."
return ffi.entry_set_mtime(self._entry_p, timestamp_sec, timestamp_nsec)

Expand All @@ -259,7 +259,7 @@ def ctime(self, value):
seconds, fraction = math.modf(value)
self.set_ctime(int(seconds), int(fraction * 1_000_000_000))

def set_ctime(self, timestamp_sec, timestamp_nsec):
def set_ctime(self, timestamp_sec, timestamp_nsec=0):
"Kept for backward compatibility. `entry.ctime = ...` is supported now."
return ffi.entry_set_ctime(self._entry_p, timestamp_sec, timestamp_nsec)

Expand Down

0 comments on commit fbf0362

Please sign in to comment.