Hi.
When renaming a file opened in geany with `disk_check_timeout!=0` a prompt is correctly displayed. Renaming it back again, and reloading it (File->Reload) everything *seems* fine. However, if the project is then closed and reopened, that file is gone.
I did not totally verify this, but my educated guess is:
In document.c:monitor_resave_missing_file the `real_path` of the missing is set to null `SETPTR(doc->real_path, NULL);`
Reloading the file does not change this.
In keyfile.c:configuration_save_session_files
`if (doc != NULL && doc->real_path != NULL)`
`real_path` is still null (unless manually saved before), so the file is gone.
Suggested fix (seems to be working):
~~~
document.c:document_open_file_full
if (! reload)
{
doc = document_create(utf8_filename);
g_return_val_if_fail(doc != NULL, NULL); /* really should not happen */
/* file exists on disk, set real_path */
SETPTR(doc->real_path, utils_get_real_path(locale_filename));
doc->priv->is_remote = utils_is_remote_path(locale_filename);
monitor_file_setup(doc);
}
+ else {
+ if( doc != NULL ){
+ SETPTR(doc->real_path, utils_get_real_path(locale_filename));
+ }
+ }
~~~
Thanks.
Tycho
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3202
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3202(a)github.com>
Allow to set a custom shortcut for every custom command, possibly checking conflicts.
Related:
https://github.com/geany/geany/issues/2730
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3272
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/3272(a)github.com>