Skip to content

Commit

Permalink
Fix #21 inconsistent Volume order
Browse files Browse the repository at this point in the history
  • Loading branch information
trannamtrung1st committed Feb 20, 2022
1 parent a4e72f4 commit 70829c4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RepositoryUrl>https://github.com/trannamtrung1st/elFinder.Net.Core</RepositoryUrl>
<RepositoryType>OSS</RepositoryType>
<PackageTags>elFinder, connector, file-manager, driver, plugins</PackageTags>
<Version>1.4.0</Version>
<Version>1.4.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<IsPackable>true</IsPackable>
<Description>This package enables ASP.NET Core 2.2 projects to easily integrate the elFinder.Net.Core connector. See the example project on Github for usage detail.</Description>
<PackageIcon>logo.png</PackageIcon>
<Version>1.4.0</Version>
<Version>1.4.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions elFinder.Net.Core/elFinder.Net.Core/Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@ protected virtual async Task<ConnectorResult> ProcessCoreAsync(ConnectorCommand

if (openCmd.Tree == 1)
{
foreach (var volume in Volumes)
for (var i = 0; i < Volumes.Count; i++)
{
var volume = Volumes[i];

if (openCmd.TargetPath.IsRoot && volume == openVolume) continue;

var rootVolumeDir = volume.Driver.CreateDirectory(volume.RootDirectory, volume);
var hash = rootVolumeDir.GetHash(volume, pathParser);
openResp.files.Add(await rootVolumeDir.ToFileInfoAsync(hash, null, volume, Options, cancellationToken: cancellationToken));
var dirInfo = await rootVolumeDir.ToFileInfoAsync(hash, null, volume, Options, cancellationToken: cancellationToken);
openResp.files.Insert(i, dirInfo);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
See the example project on Github for usage detail.
</Description>
<PackageIcon>logo.png</PackageIcon>
<Version>1.4.0</Version>
<Version>1.4.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<IsPackable>true</IsPackable>
<Description>elFinder.Net.Core Local File System driver.</Description>
<PackageIcon>logo.png</PackageIcon>
<Version>1.4.0</Version>
<Version>1.4.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 70829c4

Please sign in to comment.