From 26fd36170043fcc862069a06bab7d7a3bddaf29b Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Mon, 24 Jul 2006 19:18:31 +0000 Subject: [PATCH] 345397 Support pathnames in nsLocalFileOSX::SetPersistentDescriptor. r=josh sr=darin a/1.8.1=beltzner git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@203534 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileOSX.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/xpcom/io/nsLocalFileOSX.cpp b/mozilla/xpcom/io/nsLocalFileOSX.cpp index ee075df334b..65300b52a22 100644 --- a/mozilla/xpcom/io/nsLocalFileOSX.cpp +++ b/mozilla/xpcom/io/nsLocalFileOSX.cpp @@ -1344,6 +1344,13 @@ NS_IMETHODIMP nsLocalFile::SetPersistentDescriptor(const nsACString& aPersistent if (aPersistentDescriptor.IsEmpty()) return NS_ERROR_INVALID_ARG; + // Support pathnames as user-supplied descriptors if they begin with '/' + // or '~'. These characters do not collide with the base64 set used for + // encoding alias records. + char first = aPersistentDescriptor.First(); + if (first == '/' || first == '~') + return InitWithNativePath(aPersistentDescriptor); + nsresult rv = NS_OK; PRUint32 dataSize = aPersistentDescriptor.Length();