mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 17:38:36 +00:00
345397 Support pathnames in nsLocalFileOSX::SetPersistentDescriptor. r=josh sr=darin
This commit is contained in:
parent
2338f23a33
commit
f41b9c5029
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user