mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 766269 - Thunderbird Permanent orange: TEST_UNEXPECTED_FAIL | test_0030_general.js. Correctly handle MOZ_APP_BASENAME and MOZ_APP_VENDOR being unset when determining the update location for unit tests on Windows. r=ehsan, test-only
This commit is contained in:
parent
971e412f9e
commit
3f0160f5ad
@ -21,13 +21,17 @@ CMMSRCS += xpcshellMacUtils.mm
|
||||
endif
|
||||
|
||||
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
||||
ifdef MOZ_APP_PROFILE
|
||||
DEFINES += -DMOZ_APP_PROFILE='"$(MOZ_APP_PROFILE)"'
|
||||
else
|
||||
DEFINES += -DMOZ_APP_VENDOR='"$(MOZ_APP_VENDOR)"'
|
||||
DEFINES += -DMOZ_APP_BASENAME='"$(MOZ_APP_BASENAME)"'
|
||||
DEFINES += -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
|
||||
endif
|
||||
ifdef MOZ_APP_PROFILE
|
||||
DEFINES += -DMOZ_APP_PROFILE='"$(MOZ_APP_PROFILE)"'
|
||||
else
|
||||
ifdef MOZ_APP_VENDOR
|
||||
DEFINES += -DMOZ_APP_VENDOR='"$(MOZ_APP_VENDOR)"'
|
||||
endif
|
||||
ifdef MOZ_APP_BASENAME
|
||||
DEFINES += -DMOZ_APP_BASENAME='"$(MOZ_APP_BASENAME)"'
|
||||
endif
|
||||
DEFINES += -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBS = \
|
||||
|
@ -2032,18 +2032,27 @@ XPCShellDirProvider::GetFile(const char *prop, bool *persistent,
|
||||
FAILED(SHGetPathFromIDListA(pItemIDList, appData))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
#ifdef MOZ_APP_PROFILE
|
||||
sprintf(path, "%s\\%s", appData, MOZ_APP_PROFILE);
|
||||
#else
|
||||
sprintf(path, "%s\\%s\\%s\\%s", appData, MOZ_APP_VENDOR, MOZ_APP_BASENAME, MOZ_APP_NAME);
|
||||
#endif
|
||||
nsAutoString pathName;
|
||||
pathName.AssignASCII(path);
|
||||
pathName.AssignASCII(appData);
|
||||
nsCOMPtr<nsIFile> localFile;
|
||||
nsresult rv = NS_NewLocalFile(pathName, true, getter_AddRefs(localFile));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef MOZ_APP_PROFILE
|
||||
localFile->AppendNative(NS_LITERAL_CSTRING(MOZ_APP_PROFILE));
|
||||
#else
|
||||
// MOZ_APP_VENDOR and MOZ_APP_BASENAME are optional.
|
||||
#ifdef MOZ_APP_VENDOR
|
||||
localFile->AppendNative(NS_LITERAL_CSTRING(MOZ_APP_VENDOR));
|
||||
#endif
|
||||
#ifdef MOZ_APP_BASENAME
|
||||
localFile->AppendNative(NS_LITERAL_CSTRING(MOZ_APP_BASENAME));
|
||||
#endif
|
||||
// However app name is always appended.
|
||||
localFile->AppendNative(NS_LITERAL_CSTRING(MOZ_APP_NAME));
|
||||
#endif
|
||||
return localFile->Clone(result);
|
||||
#else
|
||||
// Fail on non-Windows platforms, the caller is supposed to fal back on
|
||||
|
Loading…
Reference in New Issue
Block a user