mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
FS refactoring, 64-bit timestamps
This commit is contained in:
@@ -19,7 +19,7 @@ int main(int argc, const char **argv)
|
||||
fprintf(stderr, "File type ID must be 4 characters");
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
if (strlen(argv[4]) != 4)
|
||||
{
|
||||
fprintf(stderr, "File creator ID must be 4 characters");
|
||||
@@ -29,14 +29,14 @@ int main(int argc, const char **argv)
|
||||
FILETIME currentTime;
|
||||
GetSystemTimeAsFileTime(¤tTime);
|
||||
|
||||
SYSTEMTIME epochStart;
|
||||
epochStart.wYear = 1904;
|
||||
epochStart.wMonth = 1;
|
||||
epochStart.wDayOfWeek = 5;
|
||||
epochStart.wDay = 1;
|
||||
epochStart.wHour = 0;
|
||||
epochStart.wMinute = 0;
|
||||
epochStart.wSecond = 0;
|
||||
SYSTEMTIME epochStart;
|
||||
epochStart.wYear = 1904;
|
||||
epochStart.wMonth = 1;
|
||||
epochStart.wDayOfWeek = 5;
|
||||
epochStart.wDay = 1;
|
||||
epochStart.wHour = 0;
|
||||
epochStart.wMinute = 0;
|
||||
epochStart.wSecond = 0;
|
||||
epochStart.wMilliseconds = 0;
|
||||
|
||||
FILETIME epochStartFT;
|
||||
@@ -61,19 +61,19 @@ int main(int argc, const char **argv)
|
||||
const char *arg = argv[i];
|
||||
if (!strcmp(arg, "locked"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_LOCKED;
|
||||
else if (!strcmp(arg, "invisible"))
|
||||
else if (!strcmp(arg, "invisible"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_INVISIBLE;
|
||||
else if (!strcmp(arg, "bundle"))
|
||||
else if (!strcmp(arg, "bundle"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_BUNDLE;
|
||||
else if (!strcmp(arg, "system"))
|
||||
else if (!strcmp(arg, "system"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_SYSTEM;
|
||||
else if (!strcmp(arg, "copyprotected"))
|
||||
else if (!strcmp(arg, "copyprotected"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_COPY_PROTECTED;
|
||||
else if (!strcmp(arg, "busy"))
|
||||
else if (!strcmp(arg, "busy"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_BUSY;
|
||||
else if (!strcmp(arg, "changed"))
|
||||
else if (!strcmp(arg, "changed"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_CHANGED;
|
||||
else if (!strcmp(arg, "inited"))
|
||||
else if (!strcmp(arg, "inited"))
|
||||
mfp.m_finderFlags |= PortabilityLayer::FINDER_FILE_FLAG_INITED;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ int main(int argc, const char **argv)
|
||||
fwrite(mps.m_data, PortabilityLayer::MacFilePropertiesSerialized::kSize, 1, file);
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user