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
This commit is contained in:
mark%moxienet.com
2006-07-24 19:18:31 +00:00
parent 29f7873342
commit 26fd361700

View File

@@ -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();