0
0
Fork 0
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:
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) 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