From 8b786c221db7b560c1dec569082f7c266cc7bd19 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Thu, 24 Feb 2000 00:48:30 +0000 Subject: [PATCH] Implement the equivalent of Unix's realpath() for BeOS. Build blocker. a=leaf git-svn-id: svn://10.0.0.236/trunk@61548 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileUnix.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 63ce909f0a5..17eb646c27a 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -36,6 +36,9 @@ #include #include #include +#ifdef XP_BEOS +#include +#endif #include "nsCRT.h" #include "nsCOMPtr.h" @@ -410,7 +413,16 @@ nsLocalFile::Normalize() char resolved_path[PATH_MAX]; char *resolved_path_ptr = NULL; CHECK_mPath(); +#ifdef XP_BEOS + BEntry be_e((const char*)mPath, true); + BPath be_p; + status_t err; + if ((err = be_e.GetPath(&be_p)) == B_OK) { + resolved_path_ptr = be_p.Path(); + }; +#else resolved_path_ptr = realpath(mPath, resolved_path); +#endif // if there is an error, the return is null. if (resolved_path_ptr == NULL) { return NSRESULT_FOR_ERRNO();