Bug 655498 - Remove WinCE code from profile/* ; r=bsmedberg

This commit is contained in:
Ed Morley 2011-05-17 16:06:10 +02:00
parent d260544670
commit c24361f216

View File

@ -591,23 +591,13 @@ nsresult nsProfileLock::Lock(nsILocalFile* aProfileDir,
rv = lockFile->GetPath(filePath);
if (NS_FAILED(rv))
return rv;
#ifdef WINCE
// WinCE doesn't have FILE_FLAG_DELETE_ON_CLOSE, so let's just try
// to delete the file first before creating it. This will fail
// if it's already open.
DeleteFileW(filePath.get());
#endif
mLockFileHandle = CreateFileW(filePath.get(),
GENERIC_READ | GENERIC_WRITE,
0, // no sharing - of course
nsnull,
OPEN_ALWAYS,
#ifndef WINCE
FILE_FLAG_DELETE_ON_CLOSE,
#else
FILE_ATTRIBUTE_NORMAL,
#endif
nsnull);
if (mLockFileHandle == INVALID_HANDLE_VALUE) {
// XXXbsmedberg: provide a profile-unlocker here!