Closed Bug 508265 Opened 16 years ago Closed 16 years ago

Localized bookmarks backup are not replaced by new backups

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.6a1
Tracking Status
blocking1.9.1 --- .3+
status1.9.1 --- .3-fixed

People

(Reporter: mak, Assigned: mak)

References

Details

(4 keywords)

Attachments

(2 files, 2 obsolete files)

This has been notified to me on the Mozillaitalia forums, looks like localized bookmarks backups are never removed, and never replaced by new backups. Looking at my Library i just noticed i have the same issue, i have 4 old january backups, and only one August backup, that is replaced every day. this is bad, and should be fixed in one of the next 1.9.1 releases, otherwise international users will have high possibility to incur in dataloss.
and when i choose Save, it tries to save a backup with localized name... sigh
looks like we do something stupid: backupFileNames.sort(); In italian Bookmarks is translated with "Segnalibri", this means the new bookmark, once sorted, will always be the first (it starts with B), and thus considered the oldest. we should provide a custom comparator for the date part, and possibly a valid unit test.
Flags: in-testsuite?
Attached patch patch v1.0 (obsolete) — Splinter Review
this solves the issue, test coming.
Attached patch patch v1.1 + test (obsolete) — Splinter Review
Attachment #392511 - Attachment is obsolete: true
Attachment #392734 - Flags: review?(dietrich)
asking in litmus too, checking which backups are available is quite trivial and errors are evident. Human support would be useful.
Flags: in-litmus?
Comment on attachment 392734 [details] [diff] [review] patch v1.1 + test >diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js >--- a/browser/components/places/content/places.js >+++ b/browser/components/places/content/places.js >@@ -551,29 +551,27 @@ var PlacesOrganizer = { > var dirSvc = Cc["@mozilla.org/file/directory_service;1"]. > getService(Ci.nsIProperties); > var backupsDir = dirSvc.get("Desk", Ci.nsILocalFile); > fp.displayDirectory = backupsDir; > > // Use YYYY-MM-DD (ISO 8601) as it doesn't contain illegal characters > // and makes the alphabetical order of multiple backup files more useful. > var date = (new Date).toLocaleFormat("%Y-%m-%d"); >- fp.defaultString = PlacesUIUtils.getFormattedString("bookmarksBackupFilenameJSON", >- [date]); >+ fp.defaultString = "bookmarks-" + date + ".json"; please take the code and comments in utils.js noted below, and put it in a PlacesUtils.getBackupFilename(aDate) and have callers in both files use the new method to generate the filename. http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/src/utils.js#1778 r=me otherwise
Attachment #392734 - Flags: review?(dietrich) → review+
Attached patch patch v1.2Splinter Review
m-c is closed, will push as soon as it reopens.
Attachment #392734 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Comment on attachment 392905 [details] [diff] [review] patch v1.2 please, either blocking or approval if possible. This causes our intl users to only have 1 bookmarks backup for the current day, practically no protection against dataloss.
Attachment #392905 - Flags: approval1.9.1.3?
Flags: in-testsuite? → in-testsuite+
Comment on attachment 392905 [details] [diff] [review] patch v1.2 Approved for 1.9.1.3. a=ss for release-drivers
Attachment #392905 - Flags: approval1.9.1.3? → approval1.9.1.3+
Does this only happen in Firefox 3.5 and later, or does it happen on the 1.9.0 branch (Firefox 3.0) as well?
blocking1.9.1: ? → .3+
Flags: wanted1.9.0.x?
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/66c98b03857a I don't have CVS access to 3.0 branch, Dietrich or Shawn can take care of that, since i suppose we need the fix on 3.0 due to bug 445704 being pushed there.
Depends on: 445704
Blocks: 445704
No longer depends on: 445704
Keywords: regression
patch doesn't apply on 3.0. please generate a new patch, and i can check it in once it gets a+.
looks like 1.9.0.14 is closing today, i'm not sure if makes sense asking approval for it or better for 0.15
Attachment #393760 - Flags: approval1.9.0.15?
Verified for 1.9.1.3.
Keywords: verified1.9.1
Flags: wanted1.9.0.x? → wanted1.9.0.x+
Comment on attachment 393760 [details] [diff] [review] 1.9.0 branch patch Approved for 1.9.0.15, a=dveditz for release-drivers
Attachment #393760 - Flags: approval1.9.0.15? → approval1.9.0.15+
checked into 1.9.0. Checking in browser/components/places/content/places.js; /cvsroot/mozilla/browser/components/places/content/places.js,v <-- places.js new revision: 1.169; previous revision: 1.168 done Checking in toolkit/components/places/src/utils.js; /cvsroot/mozilla/toolkit/components/places/src/utils.js,v <-- utils.js new revision: 1.26; previous revision: 1.25 done RCS file: /cvsroot/mozilla/toolkit/components/places/tests/unit/test_utils_archiveBookmarksFile.js,v done Checking in toolkit/components/places/tests/unit/test_utils_archiveBookmarksFile.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_utils_archiveBookmarksFile.js,v <-- test_utils_archiveBookmarksFile.js initial revision: 1.1 done
Keywords: fixed1.9.0.15
Verified fixed for 1.9.0 with Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.0.15pre) Gecko/2009092805 GranParadiso/3.0.15pre (.NET CLR 3.5.30729).
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: