Closed (fixed)
Project:
Backup and Migrate
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2010 at 17:02 UTC
Updated:
19 Feb 2012 at 01:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
jeffschulerI've run into this issue a few times, myself.
A warning would be appropriate. And I like the idea of providing a preview...
The easiest solution might be to truncate the name before the date is appended...
Does the filename really need to be truncated to 50 characters, anyway?
Comment #2
ronan commentedI don't really remember. I was trying to stay below a 64 character file name limit (leaving room for file extensions) but I don't remember why 64. I'm not sure what system I was imagining would choke on filenames longer than that. I'll raise this limit when I get a chance.
Comment #3
vertikal.dk commentedI just ran into another problem related to the limited length.
In my case I had made a filename using tokens and set to [site-name]_[site-date-yyyy][site-date-mm][site-date-dd] giving me a file with a date stamp in the filename. The name itself will rarely be long (like mysite_20100630), but the tokenized name is longer than 50 characters and the module will not save my profile, but returns a database error.
If there's a problem with the length of filenames, it should be checked on the generated filename and not on the tokens. I had to change the filename field to Varchar(255) to accept my filename pattern.
Martin
Comment #4
jeffschulerThis patch:
_backup_migrate_filename_append_prepare()to prepare a filename string for text to be appended to it, to ensure the concatenated string stays within max filename length._backup_migrate_clean_filename()to_backup_migrate_construct_filename(), (adding the timestamp is not "cleaning"...) and incorporates the preparation function....This one should maybe happen earlier on in the process, so we're not trimming the timestamp part of the name, (since the timestamp is ultimately what ensures we're generating unique filenames.)
I've tested this in a number of different ways, but it probably deserves a simpletest... Reviews appreciated!
Comment #5
ronan commentedCommit applied and pushed to dev.
Thanks!