Index: utils/ofarc/LHAArchive.m ================================================================== --- utils/ofarc/LHAArchive.m +++ utils/ofarc/LHAArchive.m @@ -12,10 +12,12 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#include #import "OFApplication.h" #import "OFDate.h" #import "OFFileManager.h" #import "OFLocale.h" @@ -24,10 +26,12 @@ #import "OFStdIOStream.h" #import "OFString.h" #import "LHAArchive.h" #import "OFArc.h" + +#import "OFSetItemAttributesFailedException.h" static OFArc *app; static OFString * indent(OFString *string) @@ -61,12 +65,17 @@ setModificationDate(OFString *path, OFLHAArchiveEntry *entry) { OFFileAttributes attributes = [OFDictionary dictionaryWithObject: entry.modificationDate forKey: OFFileModificationDate]; - [[OFFileManager defaultManager] setAttributes: attributes - ofItemAtPath: path]; + @try { + [[OFFileManager defaultManager] setAttributes: attributes + ofItemAtPath: path]; + } @catch (OFSetItemAttributesFailedException *e) { + if (e.errNo != EISDIR) + @throw e; + } } @implementation LHAArchive + (void)initialize { Index: utils/ofarc/TarArchive.m ================================================================== --- utils/ofarc/TarArchive.m +++ utils/ofarc/TarArchive.m @@ -12,10 +12,12 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#include #import "OFApplication.h" #import "OFDate.h" #import "OFFileManager.h" #import "OFLocale.h" @@ -24,10 +26,12 @@ #import "OFStdIOStream.h" #import "OFString.h" #import "TarArchive.h" #import "OFArc.h" + +#import "OFSetItemAttributesFailedException.h" static OFArc *app; static void setPermissions(OFString *path, OFTarArchiveEntry *entry) @@ -54,12 +58,17 @@ return; attributes = [OFDictionary dictionaryWithObject: modificationDate forKey: OFFileModificationDate]; - [[OFFileManager defaultManager] setAttributes: attributes - ofItemAtPath: path]; + @try { + [[OFFileManager defaultManager] setAttributes: attributes + ofItemAtPath: path]; + } @catch (OFSetItemAttributesFailedException *e) { + if (e.errNo != EISDIR) + @throw e; + } } @implementation TarArchive + (void)initialize { Index: utils/ofarc/ZIPArchive.m ================================================================== --- utils/ofarc/ZIPArchive.m +++ utils/ofarc/ZIPArchive.m @@ -31,10 +31,11 @@ #import "OFArc.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" +#import "OFSetItemAttributesFailedException.h" static OFArc *app; static void setPermissions(OFString *path, OFZIPArchiveEntry *entry) @@ -64,12 +65,17 @@ return; attributes = [OFDictionary dictionaryWithObject: modificationDate forKey: OFFileModificationDate]; - [[OFFileManager defaultManager] setAttributes: attributes - ofItemAtPath: path]; + @try { + [[OFFileManager defaultManager] setAttributes: attributes + ofItemAtPath: path]; + } @catch (OFSetItemAttributesFailedException *e) { + if (e.errNo != EISDIR) + @throw e; + } } @implementation ZIPArchive + (void)initialize {