diff --git a/SymlinkCreator/Properties/AssemblyInfo.cs b/SymlinkCreator/Properties/AssemblyInfo.cs index 3c0d67b..5f73dfb 100644 --- a/SymlinkCreator/Properties/AssemblyInfo.cs +++ b/SymlinkCreator/Properties/AssemblyInfo.cs @@ -52,5 +52,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.7")] -[assembly: AssemblyFileVersion("1.2.7")] \ No newline at end of file +[assembly: AssemblyVersion("1.2.8")] +[assembly: AssemblyFileVersion("1.2.8")] \ No newline at end of file diff --git a/SymlinkCreator/_ReadMe/Screenshot.png b/SymlinkCreator/_ReadMe/Screenshot.png index ab61b33..5b018a2 100644 Binary files a/SymlinkCreator/_ReadMe/Screenshot.png and b/SymlinkCreator/_ReadMe/Screenshot.png differ diff --git a/SymlinkCreator/core/ScriptExecutor.cs b/SymlinkCreator/core/ScriptExecutor.cs index 761b90c..87f5e8e 100644 --- a/SymlinkCreator/core/ScriptExecutor.cs +++ b/SymlinkCreator/core/ScriptExecutor.cs @@ -21,6 +21,7 @@ class ScriptExecutor : StreamWriter public ScriptExecutor(string fileName) : base(fileName) { this._fileName = fileName; + AddUnicodeSupport(this); } #endregion @@ -73,6 +74,7 @@ public void ExecuteAsAdmin() private void CreateWrapperScript(string wrapperScriptFileName, string stderrFileName) { StreamWriter wrapperScriptStreamWriter = new StreamWriter(wrapperScriptFileName); + AddUnicodeSupport(wrapperScriptStreamWriter); // redirect error output to file wrapperScriptStreamWriter.WriteLine( "\"" + Path.GetFullPath(this._fileName) + "\" 2> \"" + Path.GetFullPath(stderrFileName) + "\""); @@ -98,6 +100,12 @@ private void ExecuteWrapperScript(string wrapperScriptFileName, string stderrFil } } + private void AddUnicodeSupport(StreamWriter streamWriter) + { + // set code page to UTF-8 to support unicode file paths + streamWriter.WriteLine("chcp 65001 >NUL"); + } + #endregion } } \ No newline at end of file diff --git a/SymlinkCreator/core/SymlinkAgent.cs b/SymlinkCreator/core/SymlinkAgent.cs index b87e8b5..0cd3b4f 100644 --- a/SymlinkCreator/core/SymlinkAgent.cs +++ b/SymlinkCreator/core/SymlinkAgent.cs @@ -74,9 +74,6 @@ private ScriptExecutor PrepareScriptExecutor(string scriptFileName) { ScriptExecutor scriptExecutor = new ScriptExecutor(scriptFileName); - // set code page to UTF-8 to support unicode file paths - scriptExecutor.WriteLine("chcp 65001 >NUL"); - // go to destination path scriptExecutor.WriteLine(_splittedDestinationPath[0]); scriptExecutor.WriteLine("cd \"" + _destinationPath + "\"");