mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 18:01:44 -10:00
Bug 1263992 - patch 1 - Remove DirectoryType enum, r=smaug
This commit is contained in:
1 parent
bad1908eb3
commit
b4480fa824
19 files changed
+83
-174
No files matched your search
@@ -115,10 +115,32 @@ DeviceStorageFileSystem::GetParentObject() const
|
||||
}
|
||||
|
||||
void
|
||||
DeviceStorageFileSystem::GetRootName(nsAString& aRetval) const
|
||||
DeviceStorageFileSystem::GetDirectoryName(nsIFile* aFile, nsAString& aRetval,
|
||||
ErrorResult& aRv) const
|
||||
{
|
||||
AssertIsOnOwningThread();
|
||||
aRetval = mStorageName;
|
||||
MOZ_ASSERT(aFile);
|
||||
|
||||
nsCOMPtr<nsIFile> rootPath;
|
||||
aRv = NS_NewLocalFile(LocalOrDeviceStorageRootPath(), false,
|
||||
getter_AddRefs(rootPath));
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool equal = false;
|
||||
aRv = aFile->Equals(rootPath, &equal);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (equal) {
|
||||
aRetval = mStorageName;
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystemBase::GetDirectoryName(aFile, aRetval, aRv);
|
||||
NS_WARN_IF(aRv.Failed());
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in new issue
Block a user