Truncate absurdly long bookmark names.
Fixes #9593. The complete name could be stored inside the file or as an additional attribute, but do we really need it? The bookmark menu will truncate it even further, anyway.
This commit is contained in:
parent
2b103ca8be
commit
2860fecc80
|
@ -1817,8 +1817,9 @@ BrowserWindow::_CreateBookmark()
|
|||
bookmarkName.Remove(0, leafPos + 1);
|
||||
}
|
||||
// Make sure the bookmark title does not contain chars that are not
|
||||
// allowed in file names.
|
||||
// allowed in file names, and is within allowed name length.
|
||||
bookmarkName.ReplaceAll('/', '-');
|
||||
bookmarkName.Truncate(B_FILE_NAME_LENGTH - 1);
|
||||
|
||||
// Check that the bookmark exists nowhere in the bookmark hierarchy,
|
||||
// though the intended file name must match, we don't search the stored
|
||||
|
|
Loading…
Reference in New Issue