39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
dictionaryWithObject: [attributes objectForKey: key]
forKey: key];
[fileManager setAttributes: destinationAttributes
ofItemAtPath: destination];
#endif
}
@implementation GZIPArchive
+ (void)initialize
{
if (self == [GZIPArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
}
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
dictionaryWithObject: [attributes objectForKey: key]
forKey: key];
[fileManager setAttributes: destinationAttributes
ofItemAtPath: destination];
#endif
}
static void
setModificationDate(OFString *path, OFGZIPStream *stream)
{
OFDate *modificationDate = stream.modificationDate;
of_file_attributes_t attributes;
if (modificationDate == nil)
return;
attributes = [OFDictionary
dictionaryWithObject: modificationDate
forKey: of_file_attribute_key_modification_date];
[[OFFileManager defaultManager] setAttributes: attributes
ofItemAtPath: path];
}
@implementation GZIPArchive
+ (void)initialize
{
if (self == [GZIPArchive class])
app = (OFArc *)[OFApplication sharedApplication].delegate;
}
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
if (length < 0) {
app->_exitStatus = 1;
return;
}
}
if (app->_outputLevel >= 0) {
[of_stdout writeString: @"\r"];
[of_stdout writeLine: OF_LOCALIZED(@"extracting_file_done",
@"Extracting %[file]... done",
@"file", fileName)];
}
}
|
>
>
>
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
if (length < 0) {
app->_exitStatus = 1;
return;
}
}
[output close];
setModificationDate(fileName, _stream);
if (app->_outputLevel >= 0) {
[of_stdout writeString: @"\r"];
[of_stdout writeLine: OF_LOCALIZED(@"extracting_file_done",
@"Extracting %[file]... done",
@"file", fileName)];
}
}
|