Skip to content

Commit

Permalink
fix view errors bug
Browse files Browse the repository at this point in the history
Fixed a bug where the path for log.txt was no longer accurate due to new storage directory
  • Loading branch information
knightlygains committed Dec 26, 2024
1 parent 006a70d commit 949d5a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/assets/scripts/check_software.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Function Enable-RemoteRegistry {
}
}
catch {
$ErrorMessage = $Comp + " Error: " + $_.Exception.Message
Add-Content ".\assets\settings\log.txt" -Value "$_"
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/assets/scripts/functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Function Set-Error {
param(
[string]$Message
)
Add-Content ".\assets\settings\log.txt" -Value "[$(Get-Date)]`n$Message`n"
$path = Get-Location
$path = $path.Path + "\storage\data\log.txt"
Add-Content "$path" -Value "[$(Get-Date)]`n$Message`n"
}

Function Enable-WinRM {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scripts/get_uptime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param(
. .\assets\scripts\functions.ps1

$dontInvoke = $false
if($Computer -eq $env:COMPUTERNAME){
if ($Computer -eq $env:COMPUTERNAME) {
$dontInvoke = $true
}

Expand Down
8 changes: 0 additions & 8 deletions src/assets/scripts/log_error.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,7 @@ def open_errors(e):

data = {
"txt_document": True,
"txt_data": "assets/settings/log.txt"
"txt_data": f"{logging_path}"
}

content_container = ft.Column([
Expand Down

0 comments on commit 949d5a3

Please sign in to comment.