mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
don't allow error from making dir
This commit is contained in:
parent
0607514b3b
commit
e16407f5cf
1 changed files with 1 additions and 4 deletions
|
@ -148,10 +148,7 @@ func (s *Session) receiveData(pathToFile string, fileSize int64) error {
|
||||||
log.Debugf("receiving %s", pathToFile)
|
log.Debugf("receiving %s", pathToFile)
|
||||||
|
|
||||||
folderForFile, _ := filepath.Split(pathToFile)
|
folderForFile, _ := filepath.Split(pathToFile)
|
||||||
err := os.MkdirAll(folderForFile, os.ModePerm)
|
os.MkdirAll(folderForFile, os.ModePerm)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// truncate if nessecary
|
// truncate if nessecary
|
||||||
var f *os.File
|
var f *os.File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue