Branch: refs/heads/master Author: LarsDW223 lars_paulsen@web.de Committer: LarsDW223 lars_paulsen@web.de Date: Sat, 10 Mar 2018 13:08:23 UTC Commit: 93f372ba3f267b77aadab423bcd130afa293d97f https://github.com/geany/geany-plugins/commit/93f372ba3f267b77aadab423bcd130...
Log Message: ----------- workbench: fix broken live-update
This fixes the broken live-update. The feature did not work since commit dcc37957e917a2e8c2f3e5d483c9a832eceff1e0. The reason was that the sub-directories were not added to the file-table and so no file monitor was created for them. The live-update only worked for the main directories but not for their sub-directories.
Modified Paths: -------------- workbench/src/wb_project.c
Modified: workbench/src/wb_project.c 8 lines changed, 6 insertions(+), 2 deletions(-) =================================================================== @@ -824,19 +824,23 @@ static void wb_project_dir_regenerate_tags(WB_PROJECT_DIR *root, G_GNUC_UNUSED g g_hash_table_iter_init(&iter, root->file_table); while (g_hash_table_iter_next(&iter, &key, &value)) { + TMSourceFile *sf; + + sf = NULL; if (g_file_test(key, G_FILE_TEST_IS_REGULAR)) { - TMSourceFile *sf; gchar *utf8_path = key; gchar *locale_path = utils_get_locale_from_utf8(utf8_path);
sf = tm_source_file_new(locale_path, filetypes_detect(utf8_path)->name); if (sf && !document_find_by_filename(utf8_path)) g_ptr_array_add(source_files, sf);
- g_hash_table_insert(file_table, g_strdup(utf8_path), sf); g_free(locale_path); } + + /* Add all files to the file-table (files and dirs)! */ + g_hash_table_insert(file_table, g_strdup(key), sf); } g_hash_table_destroy(root->file_table); root->file_table = file_table;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).