Fix-OneDrive-Zip
Fix-OneDrive-Zip copied to clipboard
"Error: bad offset 0x1532FDFA at end of '1.zip'"
Hi all, I am try to running this script on Windows 10 on a .zip file that gives "Warning: 32-bit overflow in headers" but it gives me this error
"perl fix-onedrive-zip 1.zip
Checking '1.zip' Error: bad offset 0x1532FDFA at end of '1.zip'"
Can you help me please? Thanks!
Hey @Fefolino
need some more info to see if I can help you
Is this a zip file created by OneDrive or Windows Zip? The error you are getting suggests it might not be, but you never know. If it isn't a OneDrive/Windows zip file, do you know how it was created?
What program are you using to unzip the file? Is it 7Zip?
Can you share some details about the version of Perl you are running please? Run the command perl -V
and post the results here. Note that the capital V in the command.
I don't know how that zip was created sorry :/ Yes, I am using 7Zip to unzip it.. This is the result of perl -V, I downloaded the last version
Summary of my perl5 (revision 5 version 32 subversion 1) configuration:
Platform:
osname=MSWin32
osvers=10.0.19042.746
archname=MSWin32-x64-multi-thread
uname='Win32 strawberry-perl 5.32.1.1 #1 Sun Jan 24 15:00:15 2021 x64'
config_args='undef'
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='gcc'
ccflags =' -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
optimize='-s -O2'
cppflags='-DWIN32'
ccversion=''
gccversion='8.3.0'
gccosandvers=''
intsize=4
longsize=4
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='long long'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='g++'
ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'
libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\x86_64-w64-mingw32\lib C:\STRAWB~1\c\lib\gcc\x86_64-w64-mingw32\8.3.0
libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=
so=dll
useshrplib=true
libperl=libperl532.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs
dlext=xs.dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
HAVE_INTERP_INTERN
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Jan 24 2021 15:05:42
@INC:
C:/Strawberry/perl/site/lib
C:/Strawberry/perl/vendor/lib
C:/Strawberry/perl/lib
What you have is a zip file has been probably created by something other than OneDrive. To verify that I would need more data about the zip file - to get that can you need to run another script of mine.
Download https://github.com/pmqs/zipdetails/blob/main/bin/zipdetails and run as follows
perl zipdetails -v 1.zip
That may output a lot of data, depending on how many entries are in this zip file - see if you can upload in here. I
I have the same error. I think I compressed(made the zip file) on a mac, uploaded to Onedrive and now I'm trying to unzip the file on a windows.
7-zip warning: Warning: 32-bit overflow in headers
The programs output: Checking 'UCOR 1300.zip' Error: bad offset 0xFB35C190 at end of 'UCOR 1300.zip'
Hey @mjhymowitz
the bad offset
error means the zip file isn't in a state that this program expects for fixing the specific OneDrive issue.
If your file, UCOR 1300.zip
, was created on a Mac, uploaded to OneDrive, then downloaded to Windows, I'm doubt that OneDrive hasn't messed with it. I'd guess that the issue is with how the Mac created the zip file. To confirm that you could try copying the MAc zip file directly to a windows machine ad see if the same issue is present.
There is (or was) an issue with Mac created zip files > 4Gig files not being created properly that I' aware of. If you want help confirming that you need to upload the zipdetails
data I've asked for in the post dated the 21st Jan.