#include <boost/filesystem/operations.hpp>
+using std::find;
+using std::string;
+using std::vector;
+
namespace lyx {
using support::package;
using support::prefixIs;
-using std::find;
-using std::string;
-using std::vector;
-
namespace Alert = frontend::Alert;
namespace fs = boost::filesystem;
/// ask the user what to do if a file already exists
int checkOverwrite(FileName const & filename)
{
- if (fs::exists(filename.toFilesystemEncoding())) {
+ if (filename.exists()) {
docstring text = bformat(_("The file %1$s already exists.\n\n"
- "Do you want to over-write that file?"),
+ "Do you want to overwrite that file?"),
makeDisplayPath(filename.absFilename()));
- return Alert::prompt(_("Over-write file?"),
+ return Alert::prompt(_("Overwrite file?"),
text, 0, 2,
- _("&Over-write"), _("Over-write &all"),
+ _("&Overwrite"), _("Overwrite &all"),
_("&Cancel export"));
}
return 0;
}
if (status == CANCEL) {
buffer->message(_("Document export cancelled."));
- } else if (fs::exists(tmp_result_file.toFilesystemEncoding())) {
+ } else if (tmp_result_file.exists()) {
// Finally copy the main file
status = copyFile(format, tmp_result_file,
FileName(result_file), result_file,