Closed
Bug 908140
Opened 12 years ago
Closed 11 years ago
Hidden files (which have prefix '.') can still be viewed in Gallery app
Categories
(Firefox OS Graveyard :: Gaia::Gallery, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: echou, Unassigned)
References
Details
According to bug 838179, hidden files should be ignored by MediaDB. However, I use the latest v1.2 codebase (Gaia::Master / Gecko::b2g-inbound) and found that hidden files still appear in Gallery app.
I've checked the function ignoreName() in MediaDB.js and realized how this happened.
function ignoreName(filename) {
var path = filename.substring(0, filename.lastIndexOf('/') + 1);
return (path[0] === '.' || path.indexOf('/.') !== -1);
}
The problem is path.indexOf('/.'). Since the value of 'path' doesn't include the file name, this condition-check can only find hidden 'directory', such as .gallery. For those hidden files, we should check "filename.indexOf('/.') !== -1".
P.S: This bug may be suitable for another component. Please feel free to change.
Reporter | ||
Comment 1•12 years ago
|
||
The change made from bug 838179 doesn't seem to be necessary.
Reporter | ||
Comment 2•12 years ago
|
||
Hi David,
I would like to ask for your feedback about how mediadb treats hidden files/hidden directories. Originally I think we want to ignore those files starts with '.', then I read the comment you left on bug 838179 (bug 838179 comment 4), I was confused. Is "hide directories start with a period character but don't hide files start with a period" our final decision? If so, then I'll close this bug as resolved invalid.
Thank you!
Flags: needinfo?(dflanagan)
Comment 3•12 years ago
|
||
Hi Eric,
The answer is yes about your question. It hides files whose all ancestor directories are leading with a "dot" in its name. But it doesn't hide files whose file name is leading with a dot.
Maybe, we can use this bug to fix it.
Comment 4•11 years ago
|
||
The change in bug 838179 was made based on https://bugzilla.mozilla.org/show_bug.cgi?id=838179#c3
Chris said he thought it should be fixed, so we fixed it. I disagree slightly with that decision, but unless there is a user-visible bug here, I don't think it is worth changing it now.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(dflanagan)
Resolution: --- → INVALID
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to David Flanagan [:djf] from comment #4)
> The change in bug 838179 was made based on
> https://bugzilla.mozilla.org/show_bug.cgi?id=838179#c3
>
> Chris said he thought it should be fixed, so we fixed it. I disagree
> slightly with that decision, but unless there is a user-visible bug here, I
> don't think it is worth changing it now.
Thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•