Skip to content

Error on extract files on windows 7 #15

@july008

Description

@july008

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions