refactor: 水池截面中转文件改用 CoreTools::getTempFilePath
删除 Pool3dCmd/PoolSectionTemp.h,JMDBDlg、JMSJDlg、HZQTDlg 共 7 处
改为 CoreTools::getTempFilePath(_T("JMSJ_"), _T(".sat"), 目录)。
同时修 getTempFilePath 自身的问题:
- 传了有效父目录时 sParentPath 没有赋值,会拼出 "\JMSJ_xxx.sat"
- 父目录为空时仍对 pszParentPath 调 _taccess,参数可能是 NULL
- return sPath(); 语法错误
- objId 用 %lu 格式化 Adesk::ULongPtr,64 位下会截断,改 %I64u
temp-file-naming.md 同步改为介绍这个通用函数。
This commit is contained in:
1 parent
8caea9e6bd
commit
4e658a8ae9
7 files changed
+71
-30
No files matched your search
@@ -3,7 +3,6 @@
|
||||
#include "JMDBDlg.h"
|
||||
#include "GLTKDlg.h"
|
||||
#include "CoreTools.h"
|
||||
#include "PoolSectionTemp.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC(CJMDBDlg, CDialog)
|
||||
|
||||
@@ -88,7 +87,7 @@ void CJMDBDlg::OnBnClickedButton1()
|
||||
CString sScr;
|
||||
if (dlg.GetCrossSectionScr(sScr))
|
||||
{
|
||||
CString sFullPath = GetPoolSectionSatPath(FilePath::GetSysDir());
|
||||
CString sFullPath = CoreTools::getTempFilePath(_T("JMSJ_"), _T(".sat"), FilePath::GetSysDir());
|
||||
|
||||
CStdioFile file;
|
||||
if (file.Open(sFullPath,CFile::modeCreate |CFile::modeWrite ))
|
||||
@@ -172,7 +171,7 @@ void CJMDBDlg::OnBnClickedButton2()
|
||||
|
||||
if (m_pSectionReg != NULL && bSuccess)
|
||||
{
|
||||
CString sFullPath = GetPoolSectionSatPath(FilePath::getSystemTemporaryFolder());
|
||||
CString sFullPath = CoreTools::getTempFilePath(_T("JMSJ_"), _T(".sat"), FilePath::getSystemTemporaryFolder());
|
||||
|
||||
CString sRegionScrp = _T("");
|
||||
CString sLine;
|
||||
|
||||
Reference in new issue
Block a user