Fix count files method in PartitionStorage

pull/4/head
Ogoun 2 years ago
parent 6e0bf8ef7d
commit b3b40ade33

@ -34,7 +34,7 @@ namespace ZeroLevel.Services.PartitionStorage
}
#region API methods
public int CountDataFiles() => Directory.GetFiles(_catalog)?.Length ?? 0;
public int CountDataFiles() => Directory.Exists(_catalog) ? (Directory.GetFiles(_catalog)?.Length ?? 0) : 0;
public string GetCatalogPath() => _catalog;
public void DropData() => FSUtils.CleanAndTestFolder(_catalog);
public StorePartitionKeyValueSearchResult<TKey, TValue> Find(TKey key)

@ -46,7 +46,7 @@ namespace ZeroLevel.Services.PartitionStorage
}
#region API methods
public int CountDataFiles() => Directory.GetFiles(_catalog)?.Length ?? 0;
public int CountDataFiles() => Directory.Exists(_catalog) ? (Directory.GetFiles(_catalog)?.Length ?? 0) : 0;
public string GetCatalogPath() => _catalog;
public void DropData() => FSUtils.CleanAndTestFolder(_catalog);
public void Store(TKey key, TInput value)

@ -6,7 +6,7 @@
</Description>
<Authors>ogoun</Authors>
<Company>ogoun</Company>
<AssemblyVersion>3.3.7.8</AssemblyVersion>
<AssemblyVersion>3.3.7.9</AssemblyVersion>
<PackageReleaseNotes>PartitionStorage optimizations</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/ogoun/Zero/wiki</PackageProjectUrl>
<Copyright>Copyright Ogoun 2022</Copyright>
@ -14,8 +14,8 @@
<PackageIconUrl></PackageIconUrl>
<RepositoryUrl>https://github.com/ogoun/Zero</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>3.3.7.8</Version>
<FileVersion>3.3.7.8</FileVersion>
<Version>3.3.7.9</Version>
<FileVersion>3.3.7.9</FileVersion>
<Platforms>AnyCPU;x64;x86</Platforms>
<PackageIcon>zero.png</PackageIcon>
<DebugType>full</DebugType>

Loading…
Cancel
Save

Powered by TurnKey Linux.