From 50d63f205d86d554891b327a752bcf0a27b8bc0f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 8 Oct 2021 20:37:56 +0200 Subject: fixed hiding savepoint files on Win32 * This was an ancient bug apparently broken since d503c3b07c2157658f699294c44ad5be244727a5 (year 2014) and was therefore broken even in v0.6.4. --- src/view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/view.c') diff --git a/src/view.c b/src/view.c index e61c1a6..0ccf42e 100644 --- a/src/view.c +++ b/src/view.c @@ -290,7 +290,8 @@ teco_undo_restore_savepoint_push(gchar *savepoint, const gchar *filename) strcpy(ctx->filename, filename); #ifdef G_OS_WIN32 - ctx->orig_attrs = teco_file_get_attributes(filename); + /* NOTE: `filename` might no longer exist on disk */ + ctx->orig_attrs = teco_file_get_attributes(savepoint); if (ctx->orig_attrs != TECO_FILE_INVALID_ATTRIBUTES) teco_file_set_attributes(savepoint, ctx->orig_attrs | FILE_ATTRIBUTE_HIDDEN); -- cgit v1.2.3