47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
+
+
-
-
|
return [string stringByReplacingOccurrencesOfString: @"\n"
withString: @"\n\t"];
}
static void
setPermissions(OFString *path, OFLHAArchiveEntry *entry)
{
[app quarantineFile: path];
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
OFNumber *POSIXPermissions = entry.POSIXPermissions;
if (POSIXPermissions != nil) {
OFFileAttributes attributes;
POSIXPermissions = [OFNumber numberWithUnsignedShort:
POSIXPermissions.unsignedShortValue & 0777];
attributes = [OFDictionary
dictionaryWithObject: POSIXPermissions
forKey: OFFilePOSIXPermissions];
[[OFFileManager defaultManager] setAttributes: attributes
ofItemAtPath: path];
}
#endif
[app quarantineFile: path];
}
static void
setModificationDate(OFString *path, OFLHAArchiveEntry *entry)
{
OFFileAttributes attributes = [OFDictionary
dictionaryWithObject: entry.modificationDate
|