Skip to content

Commit

Permalink
.Net版-多图上传-在线管理:修复服务器返回图片列表不能倒序Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
51mono committed Feb 12, 2016
1 parent 2205cd3 commit 90aff8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/App_Code/ListFileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ public override void Process()
var localPath = Server.MapPath(PathToList);
buildingList.AddRange(Directory.GetFiles(localPath, "*", SearchOption.AllDirectories)
.Where(x => SearchExtensions.Contains(Path.GetExtension(x).ToLower()))
.Reverse()
.Select(x => PathToList + x.Substring(localPath.Length).Replace("\\", "/")));
Total = buildingList.Count;
FileList = buildingList.OrderBy(x => x).Skip(Start).Take(Size).ToArray();
FileList = buildingList.Skip(Start).Take(Size).ToArray();
}
catch (UnauthorizedAccessException)
{
Expand Down Expand Up @@ -103,4 +104,4 @@ private string GetStateString()
}
return "未知错误";
}
}
}

0 comments on commit 90aff8c

Please sign in to comment.