@@ -15,12 +15,13 @@ #include "config.h" #import "OFMutableTarArchiveEntry.h" #import "OFTarArchiveEntry+Private.h" -#import "OFString.h" #import "OFDate.h" +#import "OFNumber.h" +#import "OFString.h" @implementation OFMutableTarArchiveEntry @dynamic fileName, mode, UID, GID, compressedSize, uncompressedSize; @dynamic modificationDate, type, targetFileName, owner, group, deviceMajor; @dynamic deviceMinor; @@ -58,23 +59,29 @@ OFString *old = _fileName; _fileName = [fileName copy]; [old release]; } -- (void)setMode: (unsigned long)mode +- (void)setMode: (OFNumber *)mode { - _mode = mode; + OFNumber *old = _mode; + _mode = [mode retain]; + [old release]; } -- (void)setUID: (unsigned long)UID +- (void)setUID: (OFNumber *)UID { - _UID = UID; + OFNumber *old = _UID; + _UID = [UID retain]; + [old release]; } -- (void)setGID: (unsigned long)GID +- (void)setGID: (OFNumber *)GID { - _GID = GID; + OFNumber *old = _GID; + _GID = [GID retain]; + [old release]; } - (void)setCompressedSize: (unsigned long long)compressedSize { _compressedSize = compressedSize;