mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 22:46:14 +02:00
Remove metadata pipe on behalf of shairport sync
This commit is contained in:
parent
ad538d5178
commit
296a2f4dea
4 changed files with 28 additions and 8 deletions
|
@ -37,8 +37,15 @@ namespace file
|
|||
|
||||
static bool exists(const std::string& filename)
|
||||
{
|
||||
std::ifstream infile(filename.c_str());
|
||||
return infile.good();
|
||||
if (filename.empty())
|
||||
return false;
|
||||
#ifdef WINDOWS
|
||||
DWORD dwAttrib = GetFileAttributes(filename.c_str());
|
||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES);
|
||||
#else
|
||||
struct stat buffer;
|
||||
return (stat(filename.c_str(), &buffer) == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef WINDOWS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue