345397 Support pathnames in nsLocalFileOSX::SetPersistentDescriptor. r=josh sr=darin

This commit is contained in:
mark%moxienet.com 2006-07-23 15:16:37 +00:00
parent 2338f23a33
commit f41b9c5029

View File

@ -1355,6 +1355,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();