Set executable permissions to files with Executable flag

pull/243/head
js6pak 4 years ago committed by Ryan Kistner
parent afab5e44b6
commit 0e785d04b7

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
@ -7,6 +7,7 @@ using System.Net;
using System.Threading;
using System.Threading.Tasks;
using SteamKit2;
using Mono.Unix;
namespace DepotDownloader
{
@ -1046,6 +1047,11 @@ namespace DepotDownloader
throw new ContentDownloaderException(String.Format("Failed to allocate file {0}: {1}", fileFinalPath, ex.Message));
}
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && file.Flags.HasFlag(EDepotFileFlag.Executable))
{
UnixFileSystemInfo.GetFileSystemEntry(fileFinalPath).FileAccessPermissions |= FileAccessPermissions.UserExecute | FileAccessPermissions.GroupExecute | FileAccessPermissions.OtherExecute;
}
neededChunks = new List<ProtoManifest.ChunkData>(file.Chunks);
}
else

@ -13,5 +13,6 @@
<ItemGroup>
<PackageReference Include="protobuf-net" Version="3.0.101" />
<PackageReference Include="SteamKit2" Version="2.4.0-Alpha.2" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>

Loading…
Cancel
Save