1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00

don't allow error from making dir

This commit is contained in:
Zack Scholl 2019-04-12 21:18:26 -07:00
parent 0607514b3b
commit e16407f5cf

View file

@ -148,10 +148,7 @@ func (s *Session) receiveData(pathToFile string, fileSize int64) error {
log.Debugf("receiving %s", pathToFile)
folderForFile, _ := filepath.Split(pathToFile)
err := os.MkdirAll(folderForFile, os.ModePerm)
if err != nil {
return err
}
os.MkdirAll(folderForFile, os.ModePerm)
// truncate if nessecary
var f *os.File