|
@@ -40,28 +40,6 @@ namespace DigitalSignatureTest
|
|
|
Directory.CreateDirectory(trustedFolder);
|
|
|
}
|
|
|
CPDFSignature.SignCertTrustedFolder = trustedFolder;
|
|
|
-
|
|
|
-
|
|
|
- // Get the access control of the directory
|
|
|
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
|
- {
|
|
|
- DirectoryInfo directoryInfo = new DirectoryInfo(outputPath);
|
|
|
- DirectorySecurity directorySecurity = directoryInfo.GetAccessControl();
|
|
|
- directorySecurity.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow));
|
|
|
- directoryInfo.SetAccessControl(directorySecurity);
|
|
|
- }
|
|
|
- else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
|
|
- {
|
|
|
- // Set the access control of the directory
|
|
|
- string[] args = { "chmod", "-R", "777", outputPath };
|
|
|
- Process process = new Process();
|
|
|
- process.StartInfo.FileName = "/bin/chmod";
|
|
|
- process.StartInfo.Arguments = string.Join(" ", args);
|
|
|
- process.StartInfo.UseShellExecute = false;
|
|
|
- process.StartInfo.RedirectStandardOutput = true;
|
|
|
- process.Start();
|
|
|
- process.WaitForExit();
|
|
|
- }
|
|
|
|
|
|
#endregion
|
|
|
|