Bug 1061438 - [Ringtones] Fix wording for managing alerts

Why the RegExp constructor instead of a literal? Is that just so you don't have to escape all the forward slashes?

Are ringtones never allowed in subdirectories?  If the filename was Ringtones/happy/song.mp3, then you'd end up getting folder "happy" instead of "Ringtones". Even if you currently do not enumerate subdirectories, it seems like it would be better to be more general here.

If you're sure that you'll always have filenames of the form /a/b/c or b/c, then it would be easier to just do split('/') and then take the second to last element.

Also, if it was me, I think I'd put this type code in the constructor and just compute this._type at the same time you compute this._name.