From b0be981bad56043160feff223c10e7c0276f7f4b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 1 May 2024 17:54:23 +0800 Subject: [PATCH] :art: Copy file ignore symlink --- file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.go b/file.go index ab7b49c..e956a7f 100644 --- a/file.go +++ b/file.go @@ -262,7 +262,7 @@ func (*GuluFile) copyFile(source, dest string, chtimes bool) (err error) { } defer destfile.Close() - sourceinfo, err := os.Stat(source) + sourceinfo, err := os.Lstat(source) if nil != err { return }