[db] Report directory names that end in spaces

This commit is contained in:
Wolfgang Scherer 2017-11-13 04:40:12 +01:00 committed by ejurgensen
parent 3d43721cd0
commit ef767a08a4

View File

@ -3412,8 +3412,17 @@ db_directory_add(struct directory_info *di, int *id)
char *query;
char *errmsg;
int vp_len = strlen(di->virtual_path);
int ret;
if (vp_len && di->virtual_path[vp_len-1] == ' ')
{
/* Since sqlite removes the trailing space, so these
* directories will be found as new in perpetuity.
*/
DPRINTF(E_LOG, L_DB, "Directory name ends with space: [%s]\n", di->virtual_path);
}
query = sqlite3_mprintf(QADD_TMPL, di->virtual_path, di->db_timestamp, di->disabled, di->parent_id);
if (!query)