mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 04:18:36 +00:00
Fixed Windows compile.
This commit is contained in:
parent
357fec1129
commit
81ae397814
@ -182,12 +182,16 @@ static inline bool externalIdExists(const std::string& externalId) {
|
||||
static int getLastModifiedTime(const std::string& fn) {
|
||||
#ifdef WIN32
|
||||
/* todo */
|
||||
struct _stat result = { 0 };
|
||||
std::wstring fn16 = u8to16(fn.c_str());
|
||||
if (_wstat(fn16.c_str(), &result) == 0) {
|
||||
return (int) result.st_mtime;
|
||||
}
|
||||
#else
|
||||
struct stat result = { 0 };
|
||||
if (stat(fn.c_str(), &result) == 0) {
|
||||
return result.st_mtime;
|
||||
}
|
||||
#endif
|
||||
|
||||
return -1;
|
||||
}
|
@ -218,7 +218,7 @@ void GmeIndexerSource::ScanDirectory(
|
||||
this->UpdateMetadata(fullPath8, source, indexer);
|
||||
}
|
||||
catch (...) {
|
||||
std::string error = strfmt("error reading metadata for %s", fullFn.c_str());
|
||||
std::string error = strfmt("error reading metadata for %s", fullPath8.c_str());
|
||||
debug->Error(PLUGIN_NAME, error.c_str());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user