aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/view.c
diff options
context:
space:
mode:
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);