aboutsummaryrefslogtreecommitdiff
path: root/awwan.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-10-21 17:17:13 +0700
committerShulhan <ms@kilabit.info>2023-10-21 17:17:13 +0700
commit761212298e017f58345aa948aebedc2c07b73753 (patch)
tree28c556aa99678979a4162aa0e50d036d287a96ad /awwan.go
parent28f9ab76a83efcfcf777e571fea826e2dfc3e28e (diff)
downloadawwan-761212298e017f58345aa948aebedc2c07b73753.tar.xz
all: implement remote "#get:" and "#put:" with owner and mode
In remote environment, using magic command "#get:" or "#put:" with owner and mode like "#get:$OWNER+$MODE" or "#put:$OWNER+MODE" will changes the file owner to $USER or $GROUP and/or permission to $MODE. The file owner will not works if user does not have permission.
Diffstat (limited to 'awwan.go')
-rw-r--r--awwan.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/awwan.go b/awwan.go
index d2ed1f5..1f12aa8 100644
--- a/awwan.go
+++ b/awwan.go
@@ -292,7 +292,10 @@ func (aww *Awwan) Play(req *Request) (err error) {
return fmt.Errorf("%s: %w", logp, err)
}
- ses.executeScriptOnRemote(req, pos)
+ err = ses.executeScriptOnRemote(req, pos)
+ if err != nil {
+ return fmt.Errorf(`%s: %w`, logp, err)
+ }
}
return nil