neighbor/smbclient: FmtError() instead of FormatErrno()
Fixes part 2 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
This commit is contained in:
parent
3f2f3251cb
commit
466b5cb08d
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#include <libsmbclient.h>
|
#include <libsmbclient.h>
|
||||||
|
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
class SmbclientNeighborExplorer final : public NeighborExplorer {
|
class SmbclientNeighborExplorer final : public NeighborExplorer {
|
||||||
@ -165,8 +167,8 @@ ReadServers(SmbclientContext &ctx, const char *uri,
|
|||||||
ReadServers(ctx, handle, list);
|
ReadServers(ctx, handle, list);
|
||||||
ctx.CloseDirectory(handle);
|
ctx.CloseDirectory(handle);
|
||||||
} else
|
} else
|
||||||
FormatErrno(smbclient_domain, "smbc_opendir('%s') failed",
|
FmtError(smbclient_domain, "smbc_opendir('{}') failed: {}",
|
||||||
uri);
|
uri, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
[[gnu::pure]]
|
[[gnu::pure]]
|
||||||
|
Loading…
Reference in New Issue
Block a user