diff --git a/profile/dirserviceprovider/src/nsProfileLock.cpp b/profile/dirserviceprovider/src/nsProfileLock.cpp index b4a7f84737e..5bad24465cc 100644 --- a/profile/dirserviceprovider/src/nsProfileLock.cpp +++ b/profile/dirserviceprovider/src/nsProfileLock.cpp @@ -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!