Format deletions messages to match new upload/download messages

This commit is contained in:
2024-05-19 21:14:23 -04:00
parent 70e9ce34fc
commit 71f3a8d71f
+7 -1
View File
@@ -350,10 +350,16 @@ func ShearRemoteFromClient(targetLocationIncomplete string) {
// deletionSync removes entries from the client that have been deleted on the server (multi-client deletion)
func deletionSync(deletions []string) {
var filesDeleted bool
for _, deletion := range deletions {
fmt.Println(ansiDelete+deletion+backend.AnsiReset, "has been sheared, removing...")
filesDeleted = true // set a flag to indicate that files have been deleted (used to determine whether to print a gap between deletion and other messages)
fmt.Println(ansiDelete+deletion+backend.AnsiReset, "has been sheared, removing locally")
os.RemoveAll(backend.EntryRoot + deletion)
}
if filesDeleted {
fmt.Println() // add a gap between deletion and other messages
}
}
// AddFolderRemoteFromClient creates a new entry-containing directory on the local system and calls the server to create the folder remotely