mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1165818: Remove temporary Nightly only MozTemp-* clean-up code. r=jimm
This commit is contained in:
parent
9a2a86abca
commit
f310761d50
@ -688,51 +688,6 @@ SetUpSandboxEnvironment()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(NIGHTLY_BUILD)
|
||||
static void
|
||||
CleanUpOldSandboxEnvironment()
|
||||
{
|
||||
// Temporary code to clean up the old low integrity temp directories.
|
||||
// The removal of this is tracked by bug 1165818.
|
||||
nsCOMPtr<nsIFile> lowIntegrityMozilla;
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_WIN_LOW_INTEGRITY_TEMP_BASE,
|
||||
getter_AddRefs(lowIntegrityMozilla));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> iter;
|
||||
rv = lowIntegrityMozilla->GetDirectoryEntries(getter_AddRefs(iter));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool more;
|
||||
nsCOMPtr<nsISupports> elem;
|
||||
while (NS_SUCCEEDED(iter->HasMoreElements(&more)) && more) {
|
||||
rv = iter->GetNext(getter_AddRefs(elem));
|
||||
if (NS_FAILED(rv)) {
|
||||
break;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> file = do_QueryInterface(elem);
|
||||
if (!file) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nsAutoString leafName;
|
||||
rv = file->GetLeafName(leafName);
|
||||
if (NS_FAILED(rv)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (leafName.Find(NS_LITERAL_STRING("MozTemp-{")) == 0) {
|
||||
file->Remove(/* aRecursive */ true);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
CleanUpSandboxEnvironment()
|
||||
{
|
||||
@ -741,10 +696,6 @@ CleanUpSandboxEnvironment()
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(NIGHTLY_BUILD)
|
||||
CleanUpOldSandboxEnvironment();
|
||||
#endif
|
||||
|
||||
// Get temp directory suffix pref.
|
||||
nsAdoptingString tempDirSuffix =
|
||||
Preferences::GetString("security.sandbox.content.tempDirSuffix");
|
||||
|
Loading…
Reference in New Issue
Block a user