Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated recording to propt for saving after recording.

  • Loading branch information...
commit 5ce499a5b48329e6d0df74c3dc01d478ce0aba61 1 parent 249d4d4
@mdfeist authored
Showing with 14 additions and 11 deletions.
  1. +14 −11 BlinkAnalysis/Recording.cpp
View
25 BlinkAnalysis/Recording.cpp
@@ -75,7 +75,6 @@ void Recording::initializeRecording() {
ClientHandler* client = AppData::getInstance()->getClient();
if (client) {
- /*
UINT uRetVal = 0;
DWORD dwRetVal = 0;
// Get the temp path.
@@ -100,17 +99,9 @@ void Recording::initializeRecording() {
RecordingManager::getInstance()->stopRecording();
return;
}
- */
-
- OutputDebugStringA(Settings::getInstance()->getLastError());
- OutputDebugStringA(Settings::getInstance()->getDefaultProjectDirectory().c_str());
-
- std::string filePath;
- MainFormController::getInstance()->getFilePath(filePath, Settings::getInstance()->getDefaultProjectDirectory());
-
- //tempFileStream.open(szTempFileName);
- fileStream.open(filePath);
+ fileStream.open(szTempFileName);
+
if (fileStream.is_open()) {
fileStream << "<Recording>\n";
@@ -261,4 +252,16 @@ void Recording::closeRecording() {
fileStream << "</Recording>\n";
fileStream.close();
}
+
+ std::string filePath;
+ MainFormController::getInstance()->getFilePath(filePath, Settings::getInstance()->getDefaultProjectDirectory());
+
+ if (filePath != "") {
+ TCHAR destination[MAX_PATH + 1];
+ MultiByteToWideChar(CP_ACP, 0, filePath.c_str(), -1, destination, filePath.length());
+
+ destination[filePath.length()] = 0;
+
+ MoveFileEx(szTempFileName, destination, MOVEFILE_REPLACE_EXISTING);
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.