Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/filesys_log.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9857 by zmatsuo, Tue Apr 12 13:21:21 2022 UTC revision 9858 by zmatsuo, Tue Apr 12 13:21:35 2022 UTC
# Line 608  static INT_PTR CALLBACK LogFnHook(HWND D Line 608  static INT_PTR CALLBACK LogFnHook(HWND D
608                          ofn.lpstrFile = fname;                          ofn.lpstrFile = fname;
609                          ofn.nMaxFile = _countof(fname);                          ofn.nMaxFile = _countof(fname);
610                          ofn.lpstrTitle = caption;                          ofn.lpstrTitle = caption;
611                          ofn.lpstrInitialDir = ToWcharA(work->pts->LogDefaultPath);                          ofn.lpstrInitialDir = work->pts->LogDefaultPathW;
612                          BOOL Ok = GetSaveFileNameW(&ofn);                          BOOL Ok = GetSaveFileNameW(&ofn);
                         free((void *)ofn.lpstrInitialDir);  
613                          free(caption);                          free(caption);
614                          free(FNFilter);                          free(FNFilter);
615                          if (Ok) {                          if (Ok) {
# Line 1354  BOOL FLogOpenDialog(HINSTANCE hInst, HWN Line 1353  BOOL FLogOpenDialog(HINSTANCE hInst, HWN
1353   */   */
1354  wchar_t *FLogGetLogFilename(const wchar_t *log_filename)  wchar_t *FLogGetLogFilename(const wchar_t *log_filename)
1355  {  {
1356          char *logdir;          const char *logdir = ToCharW(ts.LogDefaultPathW);
   
         if (strlen(ts.LogDefaultPath) > 0) {  
                 logdir = _strdup(ts.LogDefaultPath);  
         }  
         else {  
                 logdir = ToCharW(ts.LogDirW);  
         }  
1357    
1358          // 元となるファイル名          // 元となるファイル名
1359          char base_name[MAX_PATH];          char base_name[MAX_PATH];
# Line 1380  wchar_t *FLogGetLogFilename(const wchar_ Line 1372  wchar_t *FLogGetLogFilename(const wchar_
1372          ParseStrftimeFileName(full_path, sizeof(full_path));          ParseStrftimeFileName(full_path, sizeof(full_path));
1373          ConvertLogname(full_path, sizeof(full_path));          ConvertLogname(full_path, sizeof(full_path));
1374    
1375          free(logdir);          free((void *)logdir);
1376          return ToWcharA(full_path);          return ToWcharA(full_path);
1377  }  }
1378    

Legend:
Removed from v.9857  
changed lines
  Added in v.9858

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26