mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 21:30:16 +02:00
Merge branch 'master' of github.com:schollz/croc
This commit is contained in:
commit
105fb9a3ce
1 changed files with 4 additions and 0 deletions
|
@ -1164,6 +1164,10 @@ func (c *Client) createEmptyFileAndFinish(fileInfo FileInfo, i int) (err error)
|
||||||
pathToFile := path.Join(fileInfo.FolderRemote, fileInfo.Name)
|
pathToFile := path.Join(fileInfo.FolderRemote, fileInfo.Name)
|
||||||
if fileInfo.Symlink != "" {
|
if fileInfo.Symlink != "" {
|
||||||
log.Debug("creating symlink")
|
log.Debug("creating symlink")
|
||||||
|
// remove symlink if it exists
|
||||||
|
if _, errExists := os.Lstat(pathToFile); errExists == nil {
|
||||||
|
os.Remove(pathToFile)
|
||||||
|
}
|
||||||
err = os.Symlink(fileInfo.Symlink, pathToFile)
|
err = os.Symlink(fileInfo.Symlink, pathToFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue