fix: Fixes epoll calls on linux (#818)

This commit is contained in:
Kamron Batman 2021-10-05 20:06:00 -07:00 committed by GitHub
parent ef761f9035
commit f3b722b9d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -93,16 +93,16 @@ namespace Server.Network
private static class Linux
{
[DllImport("libc", SetLastError = true)]
[DllImport("libc.so.6", SetLastError = true)]
public static extern int epoll_create1(epoll_flags flags);
[DllImport("libc", SetLastError = true)]
[DllImport("libc.so.6", SetLastError = true)]
public static extern int epoll_close(int epfd);
[DllImport("libc", SetLastError = true)]
[DllImport("libc.so.6", SetLastError = true)]
public static extern int epoll_ctl(int epfd, epoll_op op, int fd, ref epoll_event ee);
[DllImport("libc", SetLastError = true)]
[DllImport("libc.so.6", SetLastError = true)]
public static extern int epoll_wait(int epfd, [In, Out] epoll_event[] ee, int maxevents, int timeout);
}

View file

@ -380,7 +380,7 @@ namespace Server.Saves
private static IEnumerable<string> PathsByTimestampName(string path, bool files = false)
{
var allItems = files ? Directory.GetFiles(path) : Directory.GetDirectories(path);
var allItems = files ? Directory.EnumerateFiles(path) : Directory.GetDirectories(path);
var items = new SortedDictionary<DateTime, string>(new DescendingComparer<DateTime>());
foreach (var item in allItems)
{