mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Fix: add DirectorySeparatorChar at end of DataDirectory
This commit is contained in:
parent
f0aea3b5cd
commit
f0835f0c41
@ -125,13 +125,14 @@ namespace Nikse.SubtitleEdit.Core
|
||||
{
|
||||
// hack for unit tests
|
||||
var assembly = System.Reflection.Assembly.GetEntryAssembly() ?? System.Reflection.Assembly.GetExecutingAssembly();
|
||||
if (assembly.Location.Contains(@"\src\TestResults"))
|
||||
var srcTestResultsIndex = assembly.Location.IndexOf(@"\src\TestResults", StringComparison.Ordinal);
|
||||
if (srcTestResultsIndex > 0)
|
||||
{
|
||||
var debugOrReleaseFolderName = "Release";
|
||||
#if DEBUG
|
||||
debugOrReleaseFolderName = "Debug";
|
||||
#endif
|
||||
return $@"{assembly.Location.Substring(0, assembly.Location.IndexOf(@"\src\TestResults", StringComparison.Ordinal))}\src\Test\bin\{debugOrReleaseFolderName}";
|
||||
return $@"{assembly.Location.Substring(0, srcTestResultsIndex)}\src\Test\bin\{debugOrReleaseFolderName}\";
|
||||
}
|
||||
|
||||
var appDataRoamingPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Subtitle Edit");
|
||||
|
Loading…
Reference in New Issue
Block a user