mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -04:00
Format deletions messages to match new upload/download messages
This commit is contained in:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user