mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Change FTagData to use WindowsUnicodeToolShim
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
#include "CFileStream.h"
|
||||
#include "CombinedTimestamp.h"
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
#include "WindowsUnicodeToolShim.h"
|
||||
|
||||
int toolMain(int argc, const char **argv)
|
||||
{
|
||||
if (argc < 7)
|
||||
{
|
||||
@@ -28,12 +30,11 @@ int main(int argc, const char **argv)
|
||||
return -3;
|
||||
}
|
||||
|
||||
FILE *tsF = nullptr;
|
||||
errno_t ferr = fopen_s(&tsF, timestampPath.c_str(), "rb");
|
||||
FILE *tsF = fopen_utf8(timestampPath.c_str(), "rb");
|
||||
int64_t timestamp = 0;
|
||||
PortabilityLayer::CombinedTimestamp ts;
|
||||
|
||||
if (!ferr)
|
||||
if (tsF)
|
||||
{
|
||||
if (fread(&ts, 1, sizeof(ts), tsF) != sizeof(ts))
|
||||
{
|
||||
@@ -77,9 +78,8 @@ int main(int argc, const char **argv)
|
||||
PortabilityLayer::MacFilePropertiesSerialized mps;
|
||||
mps.Serialize(mfp);
|
||||
|
||||
FILE *file = nullptr;
|
||||
errno_t err = fopen_s(&file, outPath.c_str(), "wb");
|
||||
if (!err)
|
||||
FILE *file = fopen_utf8(outPath.c_str(), "wb");
|
||||
if (file)
|
||||
{
|
||||
PortabilityLayer::CFileStream stream(file);
|
||||
|
||||
|
@@ -41,6 +41,7 @@
|
||||
<Import Project="..\GpCommon.props" />
|
||||
<Import Project="..\Common.props" />
|
||||
<Import Project="..\Debug.props" />
|
||||
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
@@ -48,6 +49,7 @@
|
||||
<Import Project="..\GpCommon.props" />
|
||||
<Import Project="..\Common.props" />
|
||||
<Import Project="..\Release.props" />
|
||||
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
@@ -77,6 +79,9 @@
|
||||
<ProjectReference Include="..\PortabilityLayer\PortabilityLayer.vcxproj">
|
||||
<Project>{6ec62b0f-9353-40a4-a510-3788f1368b33}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WindowsUnicodeToolShim\WindowsUnicodeToolShim.vcxproj">
|
||||
<Project>{15009625-1120-405e-8bba-69a16cd6713d}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="FTagData.cpp" />
|
||||
|
Reference in New Issue
Block a user