Bug 888105 - '.DS_Store files can screw up origin initialization.' r=janv.

This commit is contained in:
Ben Turner 2013-06-29 19:25:15 -07:00
parent e689963ce5
commit 7597d6da65
3 changed files with 20 additions and 0 deletions

View File

@ -84,6 +84,12 @@ Client::InitOrigin(const nsACString& aOrigin, UsageRunnable* aUsageRunnable)
continue;
}
#ifdef XP_MACOSX
if (leafName.EqualsLiteral(DSSTORE_FILE_NAME)) {
continue;
}
#endif
bool isDirectory;
rv = file->IsDirectory(&isDirectory);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -20,6 +20,8 @@
#define USING_QUOTA_NAMESPACE \
using namespace mozilla::dom::quota;
#define DSSTORE_FILE_NAME ".DS_Store"
BEGIN_QUOTA_NAMESPACE
#ifdef DEBUG

View File

@ -907,6 +907,12 @@ QuotaManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
continue;
}
#ifdef XP_MACOSX
if (leafName.EqualsLiteral(DSSTORE_FILE_NAME)) {
continue;
}
#endif
bool isDirectory;
rv = file->IsDirectory(&isDirectory);
NS_ENSURE_SUCCESS(rv, rv);
@ -2063,6 +2069,12 @@ AsyncUsageRunnable::RunInternal()
continue;
}
#ifdef XP_MACOSX
if (leafName.EqualsLiteral(DSSTORE_FILE_NAME)) {
continue;
}
#endif
if (!initialized) {
bool isDirectory;
rv = file->IsDirectory(&isDirectory);