ubidump
ubidump copied to clipboard
Error on extract files on windows 7
c:\ubidumptest\ubidump.py -s 12 1.ubifs ERROR 'module' object has no attribute 'symlink'
When decompressing the ubifs file on the windows system, the creation fails because the windows system does not have symlink
change elif typ == inode.ITYPE_SYMLINK: os.symlink(inode.data, fullpath)
to import platform
elif typ == inode.ITYPE_SYMLINK:
if(platform.system()=='Windows'):
print("create symlink %s" % fullpath)
open(fullpath+'_symlink', 'wb').write('symlink to fullpath')
else:
os.symlink(inode.data, fullpath)
You can continue to unzip the file
Ah, thanks, i will wrap os.symlink in an exception handler. And, btw, I noticed os.symlink is only missing on windows in python2