[Ttssh2-commit] [8781] setfileattr でアトリビュートの設定がうまく行われないことがあったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2020年 5月 17日 (日) 01:42:08 JST


Revision: 8781
          https://osdn.net/projects/ttssh2/scm/svn/commits/8781
Author:   zmatsuo
Date:     2020-05-17 01:42:08 +0900 (Sun, 17 May 2020)
Log Message:
-----------
setfileattr でアトリビュートの設定がうまく行われないことがあったので修正

- GetAbsPath() を行うようにした
- r7369
- Ttssh2-devel 3563

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/7369

Modified Paths:
--------------
    trunk/teraterm/ttpmacro/ttl.cpp

-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/ttl.cpp
===================================================================
--- trunk/teraterm/ttpmacro/ttl.cpp	2020-05-16 16:42:00 UTC (rev 8780)
+++ trunk/teraterm/ttpmacro/ttl.cpp	2020-05-16 16:42:08 UTC (rev 8781)
@@ -3987,10 +3987,18 @@
 		Err = ErrSyntax;
 	if (Err!=0) return Err;
 
+	if (!GetAbsPath(Filename,sizeof(Filename))) {
+		// \x8E\xB8\x94s
+		SetResult(0);
+		return Err;
+	}
+
 	if (SetFileAttributesW(wc::fromUtf8(Filename), attributes) == 0) {
+		// \x8E\xB8\x94s
 		SetResult(0);
 	}
 	else {
+		// \x90\xAC\x8C\xF7
 		SetResult(1);
 	}
 


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