Improve logging for file download process
This commit is contained in:
parent
976abf68ce
commit
5c238db1da
|
@ -356,6 +356,7 @@ func (c *Client) formatForward(fwd *client.MessageForwardInfo) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) formatFile(file *client.File, compact bool) string {
|
func (c *Client) formatFile(file *client.File, compact bool) string {
|
||||||
|
log.Debugf("file: %#v", file)
|
||||||
if file == nil || file.Local == nil || file.Remote == nil {
|
if file == nil || file.Local == nil || file.Remote == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -367,6 +368,7 @@ func (c *Client) formatFile(file *client.File, compact bool) string {
|
||||||
src = file.Local.Path // source path
|
src = file.Local.Path // source path
|
||||||
_, err := os.Stat(src)
|
_, err := os.Stat(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Errorf("Cannot access source file: %v", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue