GNOME Bugzilla – Bug 624283
--confirm-overwrite only works with --save
Last modified: 2011-01-04 16:27:48 UTC
This report was originally filled at: https://bugs.edge.launchpad.net/ubuntu/+source/zenity/+bug/432570 Steps to reproduce this issue: zenity --file-selection --confirm-overwrite will not warn you if you select an existing file, you will need to add the --save option #This doesn't works zenity --file-selection --confirm-overwrite --save #This works
This is not a bug, this is a normal behavior of zenity. If you use zenity --file-selection --confirm-overwrite it just return the directory or filename you select when you click ok. If you use zenity --file-selection --save (without --confirm-overwrite) that's means you don't care if you replace or not the filename you save. If you use zenity --file-selection --confirm-overwrite --save, now that's will ask you if you want replace or not the file / directory. Anyway, the only way to enter im save dialog mode is using the --save, zenity gives you a choice asking you if you want to be advised if a file already exists and you'll override this file (using the --confirm-overwrite) or not. Perhaps, the use of --confirm-overwrite should be marked to be used only when the user use --save option, but this probably will break dependencies with old versions of zenity.
I'm closing this bug since this is the normal behavior expected by zenity.