Skip to content

Commit

Permalink
截断超长的DriveInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Jun 12, 2024
1 parent 60c0414 commit ca9bc5f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Stardust.Data/Nodes/节点在线.Biz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ static NodeOnline()
public override void Valid(Boolean isNew)
{
// 截取部分进程字段,避免过长无法保存
var len = _.Processes.Length;
if (len > 0 && Processes != null && Processes.Length > len) Processes = Processes[..len];

len = _.MACs.Length;
if (len > 0 && MACs != null && MACs.Length > len) MACs = MACs[..len];
//if (COMs != null && COMs.Length > 200) COMs = COMs.Substring(0, 199);
this.TrimExtraLong(__.Processes, __.MACs, __.DriveInfo);

if (!Dirtys[nameof(MemoryUsed)] && Node != null) MemoryUsed = Node.Memory - AvailableMemory;
if (!Dirtys[nameof(SpaceUsed)] && Node != null) SpaceUsed = Node.TotalSize - AvailableFreeSpace;
Expand Down

0 comments on commit ca9bc5f

Please sign in to comment.