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

LzmaSDKObjCExtractCallback.mm have some problem! #25

Open
codesourse opened this issue Apr 26, 2017 · 0 comments
Open

LzmaSDKObjCExtractCallback.mm have some problem! #25

codesourse opened this issue Apr 26, 2017 · 0 comments

Comments

@codesourse
Copy link

codesourse commented Apr 26, 2017

When i use function

  • (BOOL) extract:(nullable NSArray<LzmaSDKObjCItem *> *) items
    toPath:(nullable NSString *) path
    withFullPaths:(BOOL) isFullPaths

like this

[reader extract:items
         toPath:deleteLastpath
  withFullPaths:YES];

It isn't giving dictionary.

I found "LzmaSDKObjCExtractCallback.mm" line 105 "subPath" is wrong.

It is ok. As follows:

NSString * subPathNew =[fullPath stringByAppendingString: subPath];
if ([manager fileExistsAtPath:subPathNew isDirectory:&isDir]) {
if (!isDir) {
this->setLastError(E_ABORT, LINE, FILE, "Destination path: [%s] exists in directory: [%s] and it's file", [subPath UTF8String], [fullPath UTF8String]);
return E_ABORT;
}
} else if (![manager createDirectoryAtPath:subPathNew withIntermediateDirectories:YES attributes:nil error:&error] || error) {
this->setLastError(E_ABORT, LINE, FILE, "Can't create subdirectory: [%s] in directory: [%s]", [subPath UTF8String], [fullPath UTF8String]);
return E_ABORT;
}

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

1 participant