From b2d31e135eac9faba6890039d620bed2e92a0f07 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 31 Jan 2001 21:04:04 +0000 Subject: [PATCH] Bug #63346 --> implment reveal and launch methods for OS/2. code contributed by mkaply r=mkaply sr=mscott git-svn-id: svn://10.0.0.236/trunk@85870 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileOS2.cpp | 16 +++++++++++++++- mozilla/xpcom/io/nsLocalFileOS2.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mozilla/xpcom/io/nsLocalFileOS2.cpp b/mozilla/xpcom/io/nsLocalFileOS2.cpp index 54f68a13796..42a5ce2a0a4 100644 --- a/mozilla/xpcom/io/nsLocalFileOS2.cpp +++ b/mozilla/xpcom/io/nsLocalFileOS2.cpp @@ -28,6 +28,7 @@ #include "nsMemory.h" #include "nsLocalFileOS2.h" +#include "nsXPIDLString.h" #include "nsISimpleEnumerator.h" #include "nsIComponentManager.h" @@ -2178,10 +2179,23 @@ nsLocalFile::SetPersistentDescriptor(const char * aPersistentDescriptor) return InitWithPath(aPersistentDescriptor); } +#ifndef OPEN_DEFAULT +#define OPEN_DEFAULT 0 +#endif + + NS_IMETHODIMP nsLocalFile::Reveal() { - return NS_ERROR_FAILURE; + nsXPIDLCString platformPath; + + GetPath(getter_Copies(platformPath)); + + HOBJECT hobject = WinQueryObject(platformPath); + WinOpenObject( hobject, OPEN_DEFAULT, TRUE); + + // we don't care if it succeeded or failed. + return NS_OK; } diff --git a/mozilla/xpcom/io/nsLocalFileOS2.h b/mozilla/xpcom/io/nsLocalFileOS2.h index a3b0bfbe817..7855731e463 100644 --- a/mozilla/xpcom/io/nsLocalFileOS2.h +++ b/mozilla/xpcom/io/nsLocalFileOS2.h @@ -48,6 +48,8 @@ #define INCL_DOSMODULEMGR #define INCL_DOSNLS #define INCL_WINCOUNTRY +#define INCL_WINWORKPLACE + #include #if 0 // OLDWAY