aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/view.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-08 20:37:56 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-08 22:11:33 +0200
commit50d63f205d86d554891b327a752bcf0a27b8bc0f (patch)
tree06ee211af74e4ab77eecfb5efe30799f12e58339 /src/view.c
parentb6719eb383828e1cf04f4039edb0e4d8ba8a3587 (diff)
downloadsciteco-50d63f205d86d554891b327a752bcf0a27b8bc0f.tar.gz
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.
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c3
1 files changed, 2 insertions, 1 deletions
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);