Added a guard to the piped unarchiver to fail more gracefully for bad filenames of very short length.

This commit is contained in:
Andy Matuschak committed 2008-07-23 20:54:10 -07:00
1 parent 898216ac9f
commit b4c7dbe478
1 file changed
+1
+1
View File
@@ -24,6 +24,7 @@
id currentType;
while ((currentType = [typeEnumerator nextObject]))
{
if ([currentType length] > [lastPathComponent length]) continue;
if ([[lastPathComponent substringFromIndex:[lastPathComponent length] - [currentType length]] isEqualToString:currentType])
return NSSelectorFromString([typeSelectorDictionary objectForKey:currentType]);
}