Skip to content

Commit

Permalink
Fixed failings tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey M committed Dec 6, 2020
1 parent 98b9e49 commit e82910f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions DPackRx/Services/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,14 @@ private void Open()
if (_file != null)
return;

var attrib = (AssemblyCompanyAttribute)Attribute.GetCustomAttribute(
this.GetType().Assembly, typeof(AssemblyCompanyAttribute), false);
var attribs = attrib.Company.Split(' ');
var companyName = attribs[0];
if (companyName.EndsWith(",", StringComparison.OrdinalIgnoreCase))
companyName = companyName.Substring(0, companyName.Length - 1);
var attrib = (AssemblyProductAttribute)Attribute.GetCustomAttribute(
this.GetType().Assembly, typeof(AssemblyProductAttribute), false);
var product = attrib.Product;

var logFullName = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
companyName,
$"DPack for VS {_packageService.VSKnownVersion}",
product,
$"VS {_packageService.VSKnownVersion}",
this.GetType().Assembly.GetName().Name + ".log");

var dirName = Path.GetDirectoryName(logFullName);
Expand Down

0 comments on commit e82910f

Please sign in to comment.