NVHTarGzip icon indicating copy to clipboard operation
NVHTarGzip copied to clipboard

NVHTarFile.m the small bug

Open yzb-bei opened this issue 8 years ago • 0 comments

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];

yzb-bei avatar Apr 18 '18 09:04 yzb-bei