while (work)
{
gchar *buf = static_cast<gchar *>(work->data);
- if (strcmp(buf, oldpath) == 0)
+
+ if (!(g_str_has_prefix(buf, ".") && !newpath))
{
- if (newpath)
+ if (strcmp(buf, oldpath) == 0)
{
- work->data = g_strdup(newpath);
- }
- else
- {
- hd->list = g_list_remove(hd->list, buf);
+ if (newpath)
+ {
+ work->data = g_strdup(newpath);
+ }
+ else
+ {
+ hd->list = g_list_remove(hd->list, buf);
+ }
+ g_free(buf);
+ return;
}
+ }
+ else
+ {
+ hd->list = g_list_remove(hd->list, buf);
g_free(buf);
return;
}
history_list_add_to_key(bm->key, buf, 0);
g_free(buf);
- buf = bookmark_string(".", g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
- history_list_add_to_key(bm->key, buf, 0);
- g_free(buf);
+ if (!g_strcmp0(bm->key, "shortcuts") == 0)
+ {
+ buf = bookmark_string(".", g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
+ history_list_add_to_key(bm->key, buf, 0);
+ g_free(buf);
+ }
path = g_build_filename(homedir(), "Desktop", NULL);
if (isname(path))
if (strcmp(name, ".") == 0)
{
- buf = bookmark_string(name, g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
+ if (!g_strcmp0(bm->key, "shortcuts") == 0)
+ {
+ buf = bookmark_string(name, g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
+ }
+ else
+ {
+ continue;
+ }
}
else
{