Skip to content

Commit 949d5a3

Browse files
committed
fix view errors bug
Fixed a bug where the path for log.txt was no longer accurate due to new storage directory
1 parent 006a70d commit 949d5a3

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

src/assets/scripts/check_software.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Function Enable-RemoteRegistry {
4343
}
4444
}
4545
catch {
46-
$ErrorMessage = $Comp + " Error: " + $_.Exception.Message
4746
Add-Content ".\assets\settings\log.txt" -Value "$_"
4847
}
4948
}

src/assets/scripts/functions.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Function Set-Error {
33
param(
44
[string]$Message
55
)
6-
Add-Content ".\assets\settings\log.txt" -Value "[$(Get-Date)]`n$Message`n"
6+
$path = Get-Location
7+
$path = $path.Path + "\storage\data\log.txt"
8+
Add-Content "$path" -Value "[$(Get-Date)]`n$Message`n"
79
}
810

911
Function Enable-WinRM {

src/assets/scripts/get_uptime.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ param(
55
. .\assets\scripts\functions.ps1
66

77
$dontInvoke = $false
8-
if($Computer -eq $env:COMPUTERNAME){
8+
if ($Computer -eq $env:COMPUTERNAME) {
99
$dontInvoke = $true
1010
}
1111

src/assets/scripts/log_error.ps1

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2875,7 +2875,7 @@ def open_errors(e):
28752875

28762876
data = {
28772877
"txt_document": True,
2878-
"txt_data": "assets/settings/log.txt"
2878+
"txt_data": f"{logging_path}"
28792879
}
28802880

28812881
content_container = ft.Column([

0 commit comments

Comments
 (0)