mirror of
https://github.com/caddyserver/xcaddy.git
synced 2025-01-22 08:36:28 +01:00
embed: turn source path to absolute for error-less copy (#198)
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
parent
7888727a18
commit
7c21167530
1 changed files with 1 additions and 0 deletions
1
io.go
1
io.go
|
@ -12,6 +12,7 @@ import (
|
||||||
|
|
||||||
// copy recursively copies src into dst with src's file modes.
|
// copy recursively copies src into dst with src's file modes.
|
||||||
func copy(src, dst string) error {
|
func copy(src, dst string) error {
|
||||||
|
src, _ = filepath.Abs(src)
|
||||||
src = filepath.ToSlash(src)
|
src = filepath.ToSlash(src)
|
||||||
dst = filepath.ToSlash(dst)
|
dst = filepath.ToSlash(dst)
|
||||||
log.Printf("[INFO] copying files: src=%s dest=%s", src, dst)
|
log.Printf("[INFO] copying files: src=%s dest=%s", src, dst)
|
||||||
|
|
Loading…
Reference in a new issue