Commit e64521cc authored by Chris Talbot's avatar Chris Talbot
Browse files

mmsd: Add uid to folder

An MMS can come in multiple times per second, causing the directory
(and contents) to alias. This commit prevents that from happening
parent c3b14870
Pipeline #74117 failed with stages
in 7 minutes and 20 seconds
......@@ -964,7 +964,9 @@ chatty_mmsd_receive_message (ChattyMmsd *self,
if (!container) {
g_autofree char *tag = NULL;
g_autofree char *uid = NULL;
uid = g_path_get_basename (objectpath);
container = g_file_new_for_path (containerpath);
g_file_load_contents (container,
NULL,
......@@ -982,7 +984,7 @@ chatty_mmsd_receive_message (ChattyMmsd *self,
return NULL;
}
tag = g_strconcat (date, payload->sender, NULL);
tag = g_strconcat (date, payload->sender, uid, NULL);
/* Save MMS in $XDG_DATA_HOME/chatty/mms/ */
savepath = g_file_new_build_filename (g_get_user_data_dir (),
"chatty", "mms", tag, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment