Add option to preserve modify timestamp #65

This commit is contained in:
KnugiHK
2023-10-07 23:50:43 +08:00
parent 5aad65fff7
commit 91ff882d15
4 changed files with 313 additions and 4 deletions

View File

@@ -184,6 +184,13 @@ def main():
action='store_true',
help="Use Whatsapp Business default files (iOS only)"
)
parser.add_argument(
"--preserve-timestamp",
dest="preserve_timestamp",
default=False,
action='store_true',
help="Preserve the modification timestamp of the extracted files (iOS only)"
)
args = parser.parse_args()
# Check for updates
@@ -282,7 +289,7 @@ def main():
args.media = identifiers.DOMAIN
if args.backup is not None:
if not os.path.isdir(args.media):
extract_iphone_media.extract_media(args.backup, identifiers)
extract_iphone_media.extract_media(args.backup, identifiers, args.preserve_timestamp)
else:
print("WhatsApp directory already exists, skipping WhatsApp file extraction.")
if args.db is None: