[Ttssh2-commit] [5154] ticket #31016

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2013年 3月 22日 (金) 12:12:28 JST


Revision: 5154
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5154
Author:   maya
Date:     2013-03-22 12:12:27 +0900 (Fri, 22 Mar 2013)
Log Message:
-----------
ticket #31016
  プロジェクトのパスに半角スペースが含まれていると revsvn.exe の実行に失敗するのを修正

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/31016

Modified Paths:
--------------
    trunk/teraterm/svnrev/svnrev.cpp
    trunk/teraterm/ttpdlg/ttpdlg.vcproj

-------------- next part --------------
Modified: trunk/teraterm/svnrev/svnrev.cpp
===================================================================
--- trunk/teraterm/svnrev/svnrev.cpp	2013-03-20 16:23:52 UTC (rev 5153)
+++ trunk/teraterm/svnrev/svnrev.cpp	2013-03-22 03:12:27 UTC (rev 5154)
@@ -7,11 +7,18 @@
 	char command[MAX_PATH*2];
 	char result[32]= "";
 	int revision = -1;
+	char arg1[MAX_PATH], arg2[MAX_PATH];
 
 	// subversion 1.7 \x82\xA9\x82\xE7 .svn\entries \x82̃t\x83H\x81[\x83}\x83b\x83g\x82\xAA\x95ς\xED\x82\xC1\x82\xBD\x82\xBD\x82߁A
 	// .svn\entries \x82𒼐ړǂݍ\x9E\x82ނ̂\xF0\x82\xE2\x82߁A
 	// svnversion.exe \x83R\x83}\x83\x93\x83h\x82\xF0\x8CĂяo\x82\xB5\x82\xBD\x8C\x8B\x89ʂ\xF0\x95Ԃ\xB7
-	_snprintf_s(command, sizeof(command), _TRUNCATE, "%s -n %s", svnversion, path);
+
+	// _popen \x82̓X\x83y\x81[\x83X\x82\xAA\x8A܂܂\xEA\x82\xE9\x8Fꍇ\x82Ƀ_\x83u\x83\x8B\x83N\x83H\x81[\x83g\x82ň͂\xF1\x82ł\xE0
+	// \x82\xA4\x82܂\xAD\x93\xAE\x82\xA9\x82Ȃ\xA2\x82\xBD\x82\xDF 8.3 \x8C`\x8E\xAE\x82ɕϊ\xB7
+	GetShortPathName(svnversion, arg1, sizeof(arg1));
+	GetShortPathName(path, arg2, sizeof(arg2));
+
+	_snprintf_s(command, sizeof(command), _TRUNCATE, "%s -n %s", arg1, arg2);
 	if ((fp = _popen(command, "rt")) == NULL ) {
 		return -1;
 	}

Modified: trunk/teraterm/ttpdlg/ttpdlg.vcproj
===================================================================
--- trunk/teraterm/ttpdlg/ttpdlg.vcproj	2013-03-20 16:23:52 UTC (rev 5153)
+++ trunk/teraterm/ttpdlg/ttpdlg.vcproj	2013-03-22 03:12:27 UTC (rev 5154)
@@ -25,7 +25,7 @@
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="$(OutDir)\svnrev.exe $(SolutionDir)..\libs\svn\bin\svnversion.exe $(SolutionDir)..\ $(ProjectDir)svnversion.h"
+				CommandLine="$(OutDir)\svnrev.exe &quot;$(SolutionDir)..\libs\svn\bin\svnversion.exe&quot; &quot;$(SolutionDir)..&quot; &quot;$(ProjectDir)svnversion.h&quot;"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -126,7 +126,7 @@
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
-				CommandLine="$(OutDir)\svnrev.exe $(SolutionDir)..\libs\svn\bin\svnversion.exe $(SolutionDir)..\ $(ProjectDir)svnversion.h"
+				CommandLine="$(OutDir)\svnrev.exe &quot;$(SolutionDir)..\libs\svn\bin\svnversion.exe&quot; &quot;$(SolutionDir)..&quot; &quot;$(ProjectDir)svnversion.h&quot;"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"



Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る