Bug 527845 (WinCE only) - App update can't deal with read-only files. r=vlad

This commit is contained in:
Robert Strong 2009-11-11 01:02:38 -08:00
parent 907bb1faa0
commit 601b8f05da

View File

@ -47,12 +47,14 @@ int errno = 0;
int chmod(const char* path, unsigned int mode)
{
return 0;
WCHAR wpath[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH);
return _wchmod(wpath, mode);
}
int _wchmod(const WCHAR* path, unsigned int mode)
{
return 0;
return SetFileAttributesW(path, FILE_ATTRIBUTE_NORMAL) ? 0 : 1;
}
int fstat(FILE* handle, struct stat* buff)