Open Bug 1901538 Opened 2 years ago Updated 4 months ago

Add the ability to "decorate" the user's backup destination folder

Categories

(Firefox :: Shell Integration, task, P3)

task

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-device-migration])

On at least Windows and macOS, it is possible to get the native file pickers to show custom icons for folders. This bug is about doing that for the backup folder that gets created under the user's selected backup destination directory.

The icons aren't yet available, but we should build out and test the technique for creating these kinds of folders.

Blocks: 1892744
No longer blocks: 1890322
Component: Profile Backup → Shell Integration

For Windows:

Relevant docs at https://learn.microsoft.com/en-ca/windows/win32/shell/how-to-customize-folders-with-desktop-ini?redirectedfrom=MSDN. This seems straight-forward. It would be nice to put it in the (Windows) Shell Service impl but otherwise I’d write it in JS and call it a day.

So:

  • configure folder to be system;
  • write icon .ico;
  • write desktop.ini;
  • configure desktop.ini to be system, hidden

Setting the Windows bits is already accommodated, see https://searchfox.org/mozilla-central/rev/2f48061aef8c8976b73749ee845e7b85751f5f2f/dom/chrome-webidl/IOUtils.webidl#704-717. There’s support for writing INI files: https://searchfox.org/mozilla-central/rev/2f48061aef8c8976b73749ee845e7b85751f5f2f/xpcom/ds/nsIINIParser.idl#35. Writing the .ico might be the most interesting part, but if we don't need to generate the icon then I expect it’s easy to dump one from the package onto disk. Writing a relative .ico is important so that you can move the folder around.

Quick note that some support for desktop.ini was added to change the display name in bug 1998967, so all that should be left is copying the icon and adding IconFile to desktop.ini.

See Also: → 1998967
You need to log in before you can comment on or make changes to this bug.