[ttssh2-commit] [9506] ユーザーの設定ファイルフォルダの ssh_known_host を使用するよう変更

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 10月 30日 (土) 00:19:23 JST


Revision: 9506
          https://osdn.net/projects/ttssh2/scm/svn/commits/9506
Author:   zmatsuo
Date:     2021-10-30 00:19:22 +0900 (Sat, 30 Oct 2021)
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

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/hosts.c
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/hosts.c
===================================================================
--- trunk/ttssh2/ttxssh/hosts.c	2021-10-29 15:19:14 UTC (rev 9505)
+++ trunk/ttssh2/ttxssh/hosts.c	2021-10-29 15:19:22 UTC (rev 9506)
@@ -142,7 +142,7 @@
 	int amount_read;
 	wchar_t *bufW;
 
-	bufW = get_teraterm_dir_relative_nameW(name);
+	bufW = get_home_dir_relative_nameW(name);
 	fd = _wopen(bufW, _O_RDONLY | _O_SEQUENTIAL | _O_BINARY);
 	free(bufW);
 	if (fd == -1) {
@@ -1261,7 +1261,7 @@
 		int close_result;
 		wchar_t *buf;
 
-		buf = get_teraterm_dir_relative_nameW(name);
+		buf = get_home_dir_relative_nameW(name);
 		fd = _wopen(buf,
 		          _O_APPEND | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL | _O_BINARY,
 		          _S_IREAD | _S_IWRITE);
@@ -1321,7 +1321,7 @@
 		int close_result;
 		wchar_t *buf;
 
-		buf = get_teraterm_dir_relative_nameW(name);
+		buf = get_home_dir_relative_nameW(name);
 		fd = _wopen(buf,
 			_O_APPEND | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL | _O_BINARY,
 			_S_IREAD | _S_IWRITE);
@@ -1535,7 +1535,7 @@
 		}
 
 		// \x8F\x91\x82\xAB\x8D\x9E\x82݈ꎞ\x83t\x83@\x83C\x83\x8B\x82\xA9\x82烊\x83l\x81[\x83\x80
-		buf = get_teraterm_dir_relative_nameW(name);
+		buf = get_home_dir_relative_nameW(name);
 		_wunlink(buf);
 		filenameW = ToWcharA(filename);
 		_wrename(filenameW, buf);
@@ -1732,7 +1732,7 @@
 		}
 
 		// \x8F\x91\x82\xAB\x8D\x9E\x82݈ꎞ\x83t\x83@\x83C\x83\x8B\x82\xA9\x82烊\x83l\x81[\x83\x80
-		buf = get_teraterm_dir_relative_nameW(name);
+		buf = get_home_dir_relative_nameW(name);
 		_wunlink(buf);
 		filenameW = ToWcharA(filename);
 		_wrename(filenameW, buf);

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2021-10-29 15:19:14 UTC (rev 9505)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2021-10-29 15:19:22 UTC (rev 9506)
@@ -3470,7 +3470,7 @@
 			*p = 0;		// cut readonly ssh known hosts
 		}
 
-		fullpath = get_teraterm_dir_relative_nameW(filenameW);
+		fullpath = get_home_dir_relative_nameW(filenameW);
 		ret = wcslen(fullpath);
 		if (filename != NULL) {
 			wcsncpy_s(filename, maxlen, fullpath, _TRUNCATE);


ttssh2-commit メーリングリストの案内
Back to archive index