Restore pkg file timestamps while unpacking as regular user.

Requested by @dominikh.
This commit is contained in:
Juan RP
2015-02-21 16:52:27 +01:00
parent 3692ecb537
commit ae8ce64542
3 changed files with 33 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2010-2014 Juan Romero Pardines.
* Copyright (c) 2010-2015 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -46,10 +46,10 @@
#include "compat.h"
#define EXTRACT_FLAGS ARCHIVE_EXTRACT_SECURE_NODOTDOT | \
ARCHIVE_EXTRACT_SECURE_SYMLINKS
#define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_PERM | \
ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | \
EXTRACT_FLAGS
ARCHIVE_EXTRACT_SECURE_SYMLINKS | \
ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | \
ARCHIVE_EXTRACT_UNLINK
#define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | EXTRACT_FLAGS
#ifndef __UNCONST
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))