diff --git a/server.js b/server.js index 133c430..7ef38e0 100644 --- a/server.js +++ b/server.js @@ -299,6 +299,12 @@ function startServer() { // will move the old one to the old directories, and save // the new one fs.renameSync(path, movePath); + + // Don't forget to copy the hashed password. + fs.copyFileSync( + pathtools.join(movePath, "__bcrypt__hash.txt"), + pathtools.join(path, "__bcrypt__hash.txt")); + break; } }