Skip to content

Commit

Permalink
Merge pull request #2 from vov4uk/Fix_buid
Browse files Browse the repository at this point in the history
Small improvements
  • Loading branch information
vov4uk committed Oct 22, 2019
2 parents 00abe54 + 09f4543 commit 4a393b9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Binary file modified HikConsole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/HikConsole.Tests/HikConsole.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>UnitTestsRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -39,7 +40,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>..\HikConsole\HikConsole.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>UnitTestsRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoFixture, Version=4.11.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion src/HikConsole/Helpers/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static string FormatBytes(long bytes)
dblSByte = bytes / 1024.0;
}

return string.Format("{0:0.##} {1}", dblSByte, suffix[i]);
return string.Format("{0,6:0.00} {1}", dblSByte, suffix[i]);
}

public static long GetTotalFreeSpace(string destenation)
Expand Down
4 changes: 2 additions & 2 deletions src/HikConsole/HikConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public async Task<IList<FindResult>> Find(DateTime periodStart, DateTime periodE

private void PrintFileInfo(FindResult file)
{
C.Write($"{file.FileName}, {file.StartTime}, {file.StopTime}, {Utils.FormatBytes(file.FileSize)} ");
C.Write($"{file.FileName}, {file.StartTime.ToString("yyyy.MM.dd HH:mm:ss")}, {file.StopTime.ToString("yyyy.MM.dd HH:mm:ss")}, {Utils.FormatBytes(file.FileSize)} ");
}

private string GetWorkingDirectory(FindResult file)
Expand All @@ -157,7 +157,7 @@ private string GetFullPath(FindResult file, string directory = null)
private void ResetDownloadStatus()
{
this.downloadHandle = -1;
this.progress.Dispose();
this.progress?.Dispose();
this.progress = null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/HikConsole/HikConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\HikConsole.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>HikConsole.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down

0 comments on commit 4a393b9

Please sign in to comment.