Skip to content

Commit fbf0362

Browse files
authored
Merge pull request #123 from sscherfke/patch-1
2 parents b869233 + f00063b commit fbf0362

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libarchive/entry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def atime(self, value):
211211
seconds, fraction = math.modf(value)
212212
self.set_atime(int(seconds), int(fraction * 1_000_000_000))
213213

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

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

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

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

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

0 commit comments

Comments
 (0)