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

NVHTarFile.m the small bug #18

Open
yzb-bei opened this issue Apr 18, 2018 · 0 comments
Open

NVHTarFile.m the small bug #18

yzb-bei opened this issue Apr 18, 2018 · 0 comments

Comments

@yzb-bei
Copy link

yzb-bei commented Apr 18, 2018

the NVHTarFile.m createFilesAndDirectoriesAtPath: withTarObject: size: error
fileSize = 0


BOOL copied = [@"" writeToFile:filePath
                            atomically:YES 
                           encoding:NSUTF8StringEncoding
                                error:&writeError];

some time can't creat file

the code should chang

[filemanager createDirectoryAtPath:[filePath stringByDeletingLastPathComponent]
             withIntermediateDirectories:YES
                                            attributes:nil
                                                    error:&writeError];
BOOL copied = [@"" writeToFile:filePath
                                    atomically:YES
                                      encoding:NSUTF8StringEncoding
                                              error:&writeError];
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