From b0d4ea40ac16ec4a0027ca7e7e4e1c0497ca0187 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Thu, 30 Mar 2017 17:22:17 +0800 Subject: [PATCH] Fixed Bug: File not saved --- main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index 03fcd4e..8dd5c51 100644 --- a/main.cpp +++ b/main.cpp @@ -438,7 +438,13 @@ int main(int argc,char* argv[]) printf("解析完成.\n"); string fname; + ///已指定保存文件名称 if(_out_file_targeted) + { + fname=string(_out_file_name); + } + ///未指定文件名称(交互式) + else { s_time now=whattime(); char gpbuff[1024]; @@ -449,10 +455,6 @@ int main(int argc,char* argv[]) fname.append(gpbuff); fname.append(".txt"); } - else - { - fname=string(_out_file_name); - } printf("正在保存到 %s\n",fname.c_str());