• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision9506 (tree)
Time2021-10-30 00:19:22
Authorzmatsuo

Log Message

ユーザーの設定ファイルフォルダの ssh_known_host を使用するよう変更

- 従来は ttermpro.exe(ttssh.dll) のあるフォルダの ssh_known_host だった
- get_teraterm_dir_relative_nameW() を get_home_dir_relative_nameW() へ切り替え

# Conflicts:
# ttssh2/ttxssh/ttxssh.c

Change Summary

Incremental Difference

--- trunk/ttssh2/ttxssh/hosts.c (revision 9505)
+++ trunk/ttssh2/ttxssh/hosts.c (revision 9506)
@@ -142,7 +142,7 @@
142142 int amount_read;
143143 wchar_t *bufW;
144144
145- bufW = get_teraterm_dir_relative_nameW(name);
145+ bufW = get_home_dir_relative_nameW(name);
146146 fd = _wopen(bufW, _O_RDONLY | _O_SEQUENTIAL | _O_BINARY);
147147 free(bufW);
148148 if (fd == -1) {
@@ -1261,7 +1261,7 @@
12611261 int close_result;
12621262 wchar_t *buf;
12631263
1264- buf = get_teraterm_dir_relative_nameW(name);
1264+ buf = get_home_dir_relative_nameW(name);
12651265 fd = _wopen(buf,
12661266 _O_APPEND | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL | _O_BINARY,
12671267 _S_IREAD | _S_IWRITE);
@@ -1321,7 +1321,7 @@
13211321 int close_result;
13221322 wchar_t *buf;
13231323
1324- buf = get_teraterm_dir_relative_nameW(name);
1324+ buf = get_home_dir_relative_nameW(name);
13251325 fd = _wopen(buf,
13261326 _O_APPEND | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL | _O_BINARY,
13271327 _S_IREAD | _S_IWRITE);
@@ -1535,7 +1535,7 @@
15351535 }
15361536
15371537 // 書き込み一時ファイルからリネーム
1538- buf = get_teraterm_dir_relative_nameW(name);
1538+ buf = get_home_dir_relative_nameW(name);
15391539 _wunlink(buf);
15401540 filenameW = ToWcharA(filename);
15411541 _wrename(filenameW, buf);
@@ -1732,7 +1732,7 @@
17321732 }
17331733
17341734 // 書き込み一時ファイルからリネーム
1735- buf = get_teraterm_dir_relative_nameW(name);
1735+ buf = get_home_dir_relative_nameW(name);
17361736 _wunlink(buf);
17371737 filenameW = ToWcharA(filename);
17381738 _wrename(filenameW, buf);
--- trunk/ttssh2/ttxssh/ttxssh.c (revision 9505)
+++ trunk/ttssh2/ttxssh/ttxssh.c (revision 9506)
@@ -3470,7 +3470,7 @@
34703470 *p = 0; // cut readonly ssh known hosts
34713471 }
34723472
3473- fullpath = get_teraterm_dir_relative_nameW(filenameW);
3473+ fullpath = get_home_dir_relative_nameW(filenameW);
34743474 ret = wcslen(fullpath);
34753475 if (filename != NULL) {
34763476 wcsncpy_s(filename, maxlen, fullpath, _TRUNCATE);
Show on old repository browser