mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.
This also removes some PP abuse and takes file entries out of PP when no longer needed without XP_MACOSX conditionals.
This commit is contained in:
parent
02c59100a8
commit
a4b0f333ba
153 changed files with 173 additions and 4556 deletions
|
|
@ -26,11 +26,6 @@
|
|||
#include "nsIFile.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "nsILocalFileMac.h"
|
||||
#endif
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
|
|
@ -1025,33 +1020,7 @@ NS_NewToolkitProfileService(nsIToolkitProfileService* *aResult)
|
|||
nsresult
|
||||
XRE_GetFileFromPath(const char *aPath, nsIFile* *aResult)
|
||||
{
|
||||
#if defined(XP_MACOSX)
|
||||
int32_t pathLen = strlen(aPath);
|
||||
if (pathLen > MAXPATHLEN)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
CFURLRef fullPath =
|
||||
CFURLCreateFromFileSystemRepresentation(nullptr, (const UInt8 *) aPath,
|
||||
pathLen, true);
|
||||
if (!fullPath)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIFile> lf;
|
||||
nsresult rv = NS_NewNativeLocalFile(EmptyCString(), true,
|
||||
getter_AddRefs(lf));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsILocalFileMac> lfMac = do_QueryInterface(lf, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = lfMac->InitWithCFURL(fullPath);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
lf.forget(aResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
CFRelease(fullPath);
|
||||
return rv;
|
||||
|
||||
#elif defined(XP_UNIX)
|
||||
#if defined(XP_UNIX)
|
||||
char fullPath[MAXPATHLEN];
|
||||
|
||||
if (!realpath(aPath, fullPath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue