ObjFW  Diff

Differences From Artifact [b72f242916]:

To Artifact [623af154e4]:


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
static OFZIP *app;

static void
setPermissions(OFString *destination, OFString *source)
{
#ifdef OF_HAVE_CHMOD
	OFFileManager *fileManager = [OFFileManager defaultManager];
	mode_t mode = [fileManager permissionsOfItemAtPath: source];

	/* Only allow modes that are safe */
	mode &= (S_IRWXU | S_IRWXG | S_IRWXO);

	[fileManager changePermissionsOfItemAtPath: destination
				       permissions: mode];
#endif
}

@implementation GZIPArchive







|
<
<
<







27
28
29
30
31
32
33
34



35
36
37
38
39
40
41
static OFZIP *app;

static void
setPermissions(OFString *destination, OFString *source)
{
#ifdef OF_HAVE_CHMOD
	OFFileManager *fileManager = [OFFileManager defaultManager];
	uint16_t mode = [fileManager permissionsOfItemAtPath: source];




	[fileManager changePermissionsOfItemAtPath: destination
				       permissions: mode];
#endif
}

@implementation GZIPArchive