if (d->ShowModal () == wxID_OK) {
boost::filesystem::path path (wx_to_std(d->GetPath()));
- FILE* f = fopen_boost (path, "w");
+ if (path.extension() != ".pem") {
+ path += ".pem";
+ }
+ auto f = fopen_boost (path, "w");
if (!f) {
throw OpenFileError (path, errno, OpenFileError::WRITE);
}
if (d->ShowModal () == wxID_OK) {
boost::filesystem::path path (wx_to_std(d->GetPath()));
- FILE* f = fopen_boost (path, "w");
+ if (path.extension() != ".pem") {
+ path += ".pem";
+ }
+ auto f = fopen_boost (path, "w");
if (!f) {
throw OpenFileError (path, errno, OpenFileError::WRITE);
}
if (d->ShowModal () == wxID_OK) {
boost::filesystem::path path (wx_to_std(d->GetPath()));
- FILE* f = fopen_boost (path, "w");
+ if (path.extension() != ".pem") {
+ path += ".pem";
+ }
+ auto f = fopen_boost (path, "w");
if (!f) {
throw OpenFileError (path, errno, OpenFileError::WRITE);
}
if (d->ShowModal () == wxID_OK) {
boost::filesystem::path path (wx_to_std(d->GetPath()));
- FILE* f = fopen_boost (path, "w");
+ if (path.extension() != ".pem") {
+ path += ".pem";
+ }
+ auto f = fopen_boost (path, "w");
if (!f) {
throw OpenFileError (path, errno, OpenFileError::WRITE);
}