From 11d9ce3f87c97582536a7ea25d74d9c2ddfe5d1d Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 23 Mar 2022 17:00:40 -0500 Subject: [PATCH] what is going on --- src/engine/engine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index a634bd3c2..bb027ab63 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -2148,7 +2148,12 @@ int DivEngine::addSampleFromFile(const char* path) { SNDFILE* f=sf_open(path,SFM_READ,&si); if (f==NULL) { isBusy.unlock(); - lastError=fmt::sprintf("could not open file! (%s)",sf_error_number(sf_error(NULL))); + int err=sf_error(NULL); + if (err==SF_ERR_SYSTEM) { + lastError=fmt::sprintf("could not open file! (%s %s)",sf_error_number(err),strerror(errno)); + } else { + lastError=fmt::sprintf("could not open file! (%s)",sf_error_number(err)); + } return -1; } if (si.frames>16777215) {