From d844fb10109e8ff76b43794c9d169bf7518912db Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 7 Jun 2025 14:16:54 -0400 Subject: [PATCH] libmuttonserver: Fix deletions renaming --- libmuttonserver.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmuttonserver.go b/libmuttonserver.go index a6c368b..aff269c 100644 --- a/libmuttonserver.go +++ b/libmuttonserver.go @@ -66,11 +66,12 @@ func main() { // remove the old device ID file _ = os.RemoveAll(global.ConfigDir + global.PathSeparator + "devices" + global.PathSeparator + stdin[1]) // carry over deletions from the old device ID to the new one - deletionsList, _ := os.ReadDir(global.ConfigDir + global.PathSeparator + "deletions") + deletionsDirRoot := global.ConfigDir + global.PathSeparator + "deletions" + global.PathSeparator + deletionsList, _ := os.ReadDir(deletionsDirRoot) for _, deletion := range deletionsList { affectedIDTargetLocationIncomplete := strings.Split(deletion.Name(), global.FSSpace) if affectedIDTargetLocationIncomplete[0] == stdin[1] { - _ = os.Rename(deletion.Name(), stdin[0]+global.FSSpace+affectedIDTargetLocationIncomplete[1]) + _ = os.Rename(deletionsDirRoot+deletion.Name(), deletionsDirRoot+stdin[0]+global.FSSpace+affectedIDTargetLocationIncomplete[1]) } } }