ObjFW  Diff

Differences From Artifact [760ffd8cfa]:

To Artifact [88f33686f9]:


31
32
33
34
35
36
37





38
39
40
41
42
43
44
45
46

static OFZIP *app;

static void
setPermissions(OFString *path, OFLHAArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS





	of_file_attributes_t attributes = [OFDictionary
	    dictionaryWithObject: [entry mode]
			  forKey: of_file_attribute_key_posix_permissions];

	[[OFFileManager defaultManager] setAttributes: attributes
					 ofItemAtPath: path];
#endif
}








>
>
>
>
>

|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

static OFZIP *app;

static void
setPermissions(OFString *path, OFLHAArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	OFNumber *mode = [entry mode];

	if (mode == nil)
		return;

	of_file_attributes_t attributes = [OFDictionary
	    dictionaryWithObject: mode
			  forKey: of_file_attribute_key_posix_permissions];

	[[OFFileManager defaultManager] setAttributes: attributes
					 ofItemAtPath: path];
#endif
}