repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
3781df8
parent
0168f72
author
Antonio Mika
date
2023-11-10 22:24:14 +0000 UTC
Report same issues on receive
1 files changed,  +18, -0
M wish/send/rsync/rsync.go
+18, -0
 1@@ -200,11 +200,29 @@ func Middleware(writeHandler utils.CopyFromClientHandler) wish.Middleware {
 2 			}
 3 
 4 			opts, parser := rsyncreceiver.NewGetOpt()
 5+
 6+			compress := parser.Bool("z", false)
 7+
 8 			_, _ = parser.Parse(cmdFlags[1:])
 9 
10 			fileHandler.recursive = opts.Recurse
11 			fileHandler.ignoreTimes = opts.IgnoreTimes
12 
13+			if *compress {
14+				_, _ = session.Stderr().Write([]byte("compression is currently unsupported\r\n"))
15+				return
16+			}
17+
18+			if opts.PreserveUid {
19+				_, _ = session.Stderr().Write([]byte("uid preservation will not work as we don't retain user information\r\n"))
20+				return
21+			}
22+
23+			if opts.PreserveGid {
24+				_, _ = session.Stderr().Write([]byte("gid preservation will not work as we don't retain user information\r\n"))
25+				return
26+			}
27+
28 			if _, err := rsyncreceiver.ClientRun(opts, session, fileHandler, true); err != nil {
29 				writeHandler.GetLogger().Error("error running rsync receiver:", err)
30 			}