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

7z t giving wrong information about integrity of archive when quitting scanning archive #43

Closed
artsi0m opened this issue Jul 17, 2024 · 8 comments

Comments

@artsi0m
Copy link

artsi0m commented Jul 17, 2024

How to reproduce:

  1. Create archive with 7z a archive-path.7z -mx=9 dir-to-archive
  2. Wait till it will be properly archived
  3. Try to verify integrity of archive with 7z t archieve.7z
  4. Accidentally type Ctrl-C in terminal terminating the process of verifying.
  5. Receive information about archive being corrupted and be sad.
  6. Mind that you terminated the process and try again with 7z t archive.7z till it properly ends saying everything is ok. Be a little be confused.

Reproduced with 7-Zip 24.07 (x64) on Windows 11

What could be changed so, error message would state something like
Integrity check was interrupted by signal, proper information is not available?

Should it be done in a first place, because it already writes Break signaled with the last line of message after typing ctrl-c ?

@ip7z
Copy link
Owner

ip7z commented Jul 18, 2024

Please show full log after Ctrl+C.
Also create another archive that contains only one big tar file and show log after Ctrl+C.

@artsi0m
Copy link
Author

artsi0m commented Jul 18, 2024

Full log after Ctrl+C

artsi0m@Kanamori:~> 7z t /run/media/artsi0m/6E3E04E33E04A665/Documents.7z

7-Zip (z) 24.07 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-06-19
 64-bit locale=C.UTF-8 Threads:8 OPEN_MAX:1024, ASM

Scanning the drive for archives:
1 file, 8149062566 bytes (7772 MiB)

Testing archive: /run/media/artsi0m/6E3E04E33E04A665/Documents.7z
--
Path = /run/media/artsi0m/6E3E04E33E04A665/Documents.7z
Type = 7z
Physical Size = 8149062566
Headers Size = 204950
Method = ARM64 LZMA2:26 LZMA:20 BCJ2
Solid = +
Blocks = 3

 3
Archives with Errors: 1



Break signaled
artsi0m@Kanamori:~>

(I am doing it on another OS though)

@ip7z
Copy link
Owner

ip7z commented Jul 18, 2024

It doesn't write that archive is currupted.
But it counts break signal as some type of error (error during archive processing).
I suppose that issue is not critical.

@artsi0m
Copy link
Author

artsi0m commented Jul 18, 2024

I suppose that issue is not critical.

So, changing the error message is not needed ?

@artsi0m artsi0m closed this as completed Jul 18, 2024
@ip7z
Copy link
Owner

ip7z commented Jul 18, 2024

I'll try to remove "Archives with Errors: *" message for that case.

@artsi0m
Copy link
Author

artsi0m commented Jul 18, 2024

Maybe If it is not high priority issue and I was the first one who reported it you could tell me what should be done to remove that message, so I will try to do this and show you a patch for reviewing ?

@ip7z
Copy link
Owner

ip7z commented Jul 19, 2024

I've fixed it:

ExtractCallbackConsole.cpp:

  else
  {
    // we don't update NumArcsWithError, if error is not related to archive data.
    if (result == E_ABORT
        || result == HRESULT_FROM_WIN32(ERROR_DISK_FULL))
      return result;
    NumArcsWithError++; 
    
    if (_se)
    {
      *_se << endl << kError;
      if (result == E_OUTOFMEMORY)

@artsi0m
Copy link
Author

artsi0m commented Jul 28, 2024

Thanks a lot!

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

2 participants