ObjFW  Diff

Differences From Artifact [17955d8a7e]:

  • File utils/ofarc/LHAArchive.m — part of check-in [9d802a786d] at 2025-01-01 12:58:18 on branch trunk — Update copyright (user: js size: 14855) [more...]

To Artifact [a1bb7df40d]:

  • File utils/ofarc/LHAArchive.m — part of check-in [49c3cc0a97] at 2025-03-04 21:59:59 on branch trunk — ofarc: Quarantine files before setting permissions We might no longer be able to quarantine them after permissions have been set. (user: js size: 14855) [more...]

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