Skip to content

会不会漏掉一些图片 #37

Description

@wangxiaobupt

for (NSString *path in resPaths) {
NSString *name = [path lastPathComponent];
if (!name.length) {
continue;
}

        NSString *keyName = [StringUtils stringByRemoveResourceSuffix:name];

        if (!tempResNameInfoDict[keyName]) {
            BOOL isDir = NO;
            ResourceFileInfo *info = [ResourceFileInfo new];
            info.name = name;
            info.path = path;
            info.fileSize = [FileUtils fileSizeAtPath:path isDir:&isDir];
            info.isDir = isDir;
            tempResNameInfoDict[keyName] = info;
       }

}

这段代码中可能存在path不同但[path lastPathComponent];相同的图片,比如在不同的子工程中,后者就不会加到字典中。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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