Ver código fonte

Merge branch '86-cli-fileman-set-filenames-after-closing' into 'develop'

Resolve "CLI fileman: set filenames after closing"

Closes #86

See merge request tobias.wach/ccats!94
Sander, Paul 4 anos atrás
pai
commit
e2a06eca57
1 arquivos alterados com 14 adições e 1 exclusões
  1. 14 1
      cli/src/fileman.cpp

+ 14 - 1
cli/src/fileman.cpp

@@ -182,6 +182,10 @@ bool FileMan::openKey(const string &path) {
 
 void FileMan::closePut() {
 	putdata = vector<vector<char>>();
+	putname = "";
+	putpath = "";
+	putchunks = 0;
+	putchunksRemaining = 0;
 	isputting = false;
 	memset(iv, 0, sizeof(iv));
 	memset(tag, 0, sizeof(tag));
@@ -189,11 +193,20 @@ void FileMan::closePut() {
 
 void FileMan::closeGet() {
 	getfile.close();
+	getname = "";
+	getpath = "";
+	getchunks = 0;
+	getchunksRemaining = 0;
 	memset(iv, 0, sizeof(iv));
 	memset(tag, 0, sizeof(tag));
 }
 
-void FileMan::closeList() { islisting = false; }
+void FileMan::closeList() {
+	listdata = vector<Json::Value>();
+	islisting = false;
+	listchunks = 0;
+	listchunksRemaining = 0;
+}
 
 bool FileMan::closeKey() {
 	if (isPutting() || isGetting())