Bug 1722777 - Pre: Add comment explaining why Windows recursive folder deletion uses neither SHFileOperation nor IFileOperation APIs. r=nalexander

Depends on D140427

Differential Revision: https://phabricator.services.mozilla.com/D140428
This commit is contained in:
Nicholas Rishel 2022-03-22 00:28:22 +00:00
parent b920ad57d6
commit 9e17c0d135

View File

@ -2303,6 +2303,11 @@ nsLocalFile::Remove(bool aRecursive) {
if (isDir) {
if (aRecursive) {
// WARNING: neither the `SHFileOperation` nor `IFileOperation` APIs are
// appropriate here as neither handle long path names, i.e. paths prefixed
// with `\\?\` or longer than 260 characters on Windows 10+ system with
// long paths enabled.
RefPtr<nsDirEnumerator> dirEnum = new nsDirEnumerator();
rv = dirEnum->Init(this);