mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 925599 - Replace GetVersion() uses. r=bsmedberg
This commit is contained in:
parent
aec068d530
commit
a32ce4368a
@ -19,6 +19,9 @@
|
||||
#include <shlobj.h>
|
||||
#include <knownfolders.h>
|
||||
#include <guiddef.h>
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
|
||||
using mozilla::IsWin7OrLater;
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
|
||||
@ -155,10 +158,7 @@ GetLibrarySaveToPath(int aFallbackFolderId, REFKNOWNFOLDERID aFolderId,
|
||||
nsIFile** aFile)
|
||||
{
|
||||
// Skip off checking for library support if the os is Vista or lower.
|
||||
DWORD dwVersion = GetVersion();
|
||||
if ((DWORD)(LOBYTE(LOWORD(dwVersion))) < 6 ||
|
||||
((DWORD)(LOBYTE(LOWORD(dwVersion))) == 6 &&
|
||||
(DWORD)(HIBYTE(LOWORD(dwVersion))) == 0))
|
||||
if (!IsWin7OrLater())
|
||||
return GetWindowsFolder(aFallbackFolderId, aFile);
|
||||
|
||||
nsRefPtr<IShellLibrary> shellLib;
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
@ -1834,10 +1835,8 @@ nsLocalFile::CopySingleFile(nsIFile *sourceFile, nsIFile *destParent,
|
||||
// Copying a 1KB file without COPY_FILE_NO_BUFFERING takes < 1ms.
|
||||
// So we only use COPY_FILE_NO_BUFFERING when we have a remote drive.
|
||||
int copyOK;
|
||||
DWORD dwVersion = GetVersion();
|
||||
DWORD dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||
DWORD dwCopyFlags = COPY_FILE_ALLOW_DECRYPTED_DESTINATION;
|
||||
if (dwMajorVersion > 5) {
|
||||
if (IsVistaOrLater()) {
|
||||
bool path1Remote, path2Remote;
|
||||
if (!IsRemoteFilePath(filePath.get(), path1Remote) ||
|
||||
!IsRemoteFilePath(destPath.get(), path2Remote) ||
|
||||
|
Loading…
Reference in New Issue
Block a user