Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truncate does not work on file opened by another process #76

Open
mmatczuk opened this issue Jun 26, 2024 · 0 comments · May be fixed by #77
Open

truncate does not work on file opened by another process #76

mmatczuk opened this issue Jun 26, 2024 · 0 comments · May be fixed by #77

Comments

@mmatczuk
Copy link

The way truncating is implemented does not work when file is open by another process.

VERBOSE: Truncating C:\sauce-connect\logs\sc.log
Process-Local-Block : Exception calling "RotateMainOnly" with "0" argument(s): "Exception calling "WriteAllText" with "2" argument(s
): "Proces nie może uzyskać dostępu do pliku „C:\sauce-connect\logs\sc.log”, ponieważ jest on używany przez inny proces.""
At C:\Program Files\WindowsPowerShell\Modules\Log-Rotate\1.6.1\public\Log-Rotate.ps1:207 char:13
+             Process-Local-Block -block $block @blockoptions
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException,Process-Local-Block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant