ui/termstatus: Quote funny filenames

Fixes #2260, #4191.
This commit is contained in:
greatroar
2023-04-23 12:45:40 +02:00
committed by Michael Eischer
parent 07a44a88f2
commit f342db7666
4 changed files with 68 additions and 8 deletions
+2
View File
@@ -86,6 +86,8 @@ func (b *TextProgress) Error(item string, err error) error {
// CompleteItem is the status callback function for the archiver when a
// file/dir has been saved successfully.
func (b *TextProgress) CompleteItem(messageType, item string, previous, current *restic.Node, s archiver.ItemStats, d time.Duration) {
item = termstatus.Quote(item)
switch messageType {
case "dir new":
b.VV("new %v, saved in %.3fs (%v added, %v stored, %v metadata)",