Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Can't restore time" when extracting on Windows 8.1 #772

Open
mathstuf opened this issue Aug 22, 2016 · 12 comments
Open

"Can't restore time" when extracting on Windows 8.1 #772

mathstuf opened this issue Aug 22, 2016 · 12 comments

Comments

@mathstuf
Copy link

Something with this zip file, md5: 53c1c32f8f4730538a6d3e9eb5d8589e:

CMake Error: Problem with archive_write_finish_entry(): Can't restore time
CMake Error: Problem extracting tar: ftjam-2.5.2-win32.zip

This has also been seen with some Boost tarballs, so it isn't zip-specific (I'll try and find the tarball we had issues with).

Cc: @robertmaynard

@FlorianHeigl
Copy link

FlorianHeigl commented Jun 10, 2017

Can also do this if extracting to tmpfs on FreeBSD 11.
Actually no, idk what exactly did it.

/tmp/tmp.EvkSRU1l/update.tar                  100% of  325 MB 3896 kBps 01m25s
[-] Warning: Could not find extra file script.sh.  Skipping validity checks for that file.
./mnt/: Can't restore time
tar: Error exit delayed from previous errors.

At first I did it in tmpfs, got rid of that and still got the error.
If I figure out what causes this, I'll update.

@FlorianHeigl
Copy link

FlorianHeigl commented Oct 18, 2018

so I just hit this again, and am quite surprised to find my own post. again not finding it either ;-)
things did unpack though. can only suggest retrying if it happens.

@Simran-B
Copy link

Simran-B commented Mar 3, 2020

@jsonn
Copy link
Contributor

jsonn commented Mar 3, 2020

Well, there are three different cases when this message is set by archive_write_disk_windows. If the __la_win_permissive_name_w failed, if CreateFileW failed and if SetFileTime failed. A first step would be to check which of thise is the problem. You might want to try adding a printf before each goto settimes_failed and also print GetLastError() with FormatMessage.

@mathstuf
Copy link
Author

It doesn't seem to be Windows-specific based on this comment.

@sklaw
Copy link

sklaw commented Nov 17, 2021

This happens when I tried to 'tar xzf' on exFAT. Works fine on NTFS

@solvingj
Copy link

Linking this ticket to another which has the goal of making this message non-fatal, since it is regarded in some parts of the code as a "warning"
#1516

@geenath53
Copy link

@sklaw is right.
This happens when I tried to 'tar xzf' on exFAT. Works fine on NTFS
Why the he-L it does not recognize exFAT?

@loryruta
Copy link

loryruta commented Mar 7, 2023

I can confirm it gives the error on exFAT but works fine on NTFS. I just wanted to add a note:

Using Windows 10 PowerShell I'm perfectly able to change the Last Modified time on an exFAT fs, while tar -xvf <archive> -C <out-archive> complains with "Can't restore time".

@liam-clink
Copy link

This issue is still relevant on Windows 10, and for me has had the downstream effect of preventing me from being able to build OpenCV on an exFAT drive. Is there any idea why this would happen specifically with exFAT?

@NullHypothesis
Copy link

NullHypothesis commented Feb 28, 2024

I ran into this issue in a GitHub workflow that's based on macOS 12, so this does not appear to be limited to Windows. Curiously, the workflow is non-deterministic: it occurs only sporadically.

Update: My problem is discussed in this issue: actions/runner-images#2619 Passing the flag -S to tar fixed the problem for me.

@obewan
Copy link

obewan commented Jun 5, 2024

On Windows, you need to compile on an NTFS disk instead of a FAT32 or exFAT disk, then cmake can perform the extract. I guess there's an issue to extract on a FAT32 or exFAT disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests