fixing make file
[mnenc] / password.cpp
index 5ec2cd6..3125e05 100644 (file)
@@ -33,7 +33,8 @@ void password::to_string() {
 bool password::to_file(std::string filename) {
        bool worked = false;
        std::ofstream keyfile;
-       if(keyfile.open(filename.c_str())) {
+       keyfile.open(filename.c_str());
+       if(keyfile.is_open()) {
                keyfile << encryptedpw;
                keyfile.close();
                worked = true;