aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-03 17:35:34 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-03 17:35:34 +0000
commit19dfeda6d69b090bc939276b4112abe0d981a000 (patch)
tree4c6d69c63c02020b97111184d02f34170f8b18f1
parentcd90f2b6f5e39de14f265104fcfff1795156aca3 (diff)
Note in a comment that we should perhaps handle safe-saving on top of a
symlink. svn path=/trunk/; revision=43037
-rw-r--r--ui/gtk/capture_file_dlg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c
index abc2eb469d..18437b53f0 100644
--- a/ui/gtk/capture_file_dlg.c
+++ b/ui/gtk/capture_file_dlg.c
@@ -1398,7 +1398,15 @@ do_file_save_as(capture_file *cf)
return;
}
- /* The file exists. Ask the user if they want to overwrite it. */
+ /*
+ * The file exists. Ask the user if they want to overwrite it.
+ *
+ * XXX - what if it's a symlink? TextEdit just blindly replaces
+ * symlinks with files if you save over them, but gedit appears
+ * to replace the *target* of the symlink. (To find the target,
+ * use realpath() - it dates back to the SUSv2 and may be even
+ * older.)
+ */
display_basename = g_filename_display_basename(cf_name);
msg_dialog = gtk_message_dialog_new(GTK_WINDOW(file_save_as_w),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,