@LiquidCake commented on this pull request.


> +
+       new_file_path_utf8 = DOC_FILENAME(doc);
+       old_file_path_utf8 = plugin_get_document_data(geany_plugin, doc, 
"file-name-before-save-as");
+
+       if (old_file_path_utf8 != NULL)
+       {
+               if (is_persistent_untitled_doc_file(old_file_path_utf8)
+                       && ! g_str_equal(old_file_path_utf8, 
new_file_path_utf8))
+               {
+                       /* remove untitled doc file if it was saved as some 
other file */
+                       gchar *locale_old_file_path = 
utils_get_locale_from_utf8(old_file_path_utf8);
+                       g_remove(locale_old_file_path);
+
+                       g_free(locale_old_file_path);
+
+                       ui_set_statusbar(TRUE, _("Untitled document file %s was 
deleted"), old_file_path_utf8);

done

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3911#discussion_r1852778133
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3911/review/[email protected]>

Reply via email to