Bug 1068933 Backed out changeset e5e33d14ee28. forgot r=janv

This commit is contained in:
Dave Hylands 2014-10-24 13:09:46 -07:00
parent 2d547bad9a
commit 7d027557b4
2 changed files with 10 additions and 16 deletions

View File

@ -1465,21 +1465,19 @@ DeviceStorageFile::collectFilesInternal(
while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(f))) && f) {
bool isFile;
f->IsFile(&isFile);
PRTime msecs;
f->GetLastModifiedTime(&msecs);
if (isFile) {
PRTime msecs;
f->GetLastModifiedTime(&msecs);
if (msecs < aSince) {
continue;
}
if (msecs < aSince) {
continue;
}
bool isDir;
f->IsDirectory(&isDir);
bool isFile;
f->IsFile(&isFile);
nsString fullpath;
nsresult rv = f->GetPath(fullpath);
if (NS_FAILED(rv)) {

View File

@ -23,14 +23,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=717103
<script class="testbody" type="text/javascript">
devicestorage_setup();
// We put the old files in 2 levels deep. When you add a file to a directory
// it will modify the parents last modification time, but not the parents
// parents. So we want to make sure that even though x's timestamp is earlier
// than the since parameter, we still pick up the later files.
var oldFiles = ["x/y/aa.png", "x/y/ab.png", "x/y/ac.png"];
var oldFiles = ["a.png", "b.png", "c.png"];
var timeFile = "t.png";
var newFiles = ["x/y/ad.png", "x/y/ae.png", "x/y/af.png", // new files in old dir
"z/bd.png", "z/be.png", "z/bf.png"]; // new files in new dir
var newFiles = ["d.png", "e.png", "f.png"];
var storage = navigator.getDeviceStorage('pictures');
var prefix = "devicestorage/" + randomFilename(12);