summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/3rdparty/p7zip_9.04/unix/CPP/myWindows/myAddExeFlag.cpp
blob: 8a468fca7af9e26f5be4b5b463c6c6cb29dedc9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "StdAfx.h"

#include <sys/types.h>
#include <sys/stat.h>

#include <windows.h>

#define NEED_NAME_WINDOWS_TO_UNIX
#include "myPrivate.h"

#include "Common/StringConvert.h"


void myAddExeFlag(LPCTSTR filename)
{
	const char * name = nameWindowToUnix(filename);
	// printf("myAddExeFlag(%s)\n",name);
	chmod(name,0700);
}

void myAddExeFlag(const UString &u_name)
{
	myAddExeFlag(UnicodeStringToMultiByte(u_name, CP_ACP));
}