Skip to content

Commit

Permalink
Add octal conversion of rwx file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-paidis-sonarsource committed Jul 11, 2024
1 parent dac9c98 commit 207e214
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void ExtractEntry(TarInputStream tar, string destinationFullPath, TarEnt
}
catch (Exception ex) // TODO: Test this when SetPermissions is extracted
{
// TODO: Add some logging and inject ILogger
// TODO: Add some verbose logging and inject ILogger
}
}

Expand All @@ -106,7 +106,7 @@ static void SetPermissions(IOperatingSystemProvider operatingSystemProvider, Tar
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
FileName = "chmod",
Arguments = $"+arwx \"{destination}\"" // TODO: Specify more fine-grained permissinos
Arguments = $"""{Convert.ToString(source.TarHeader.Mode, 8)} "{destination}" """,
}
};
process.Start();
Expand Down

0 comments on commit 207e214

Please sign in to comment.