Skip to content

Commit

Permalink
Fixed no libzip build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Kamenev committed Feb 25, 2016
1 parent 90c2fbf commit 467520a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Readers/ImageReader/ImageDataDeserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ void ImageDataDeserializer::RegisterByteReader(size_t seqId, const std::string&
// Is it container or plain image file?
if (atPos == std::string::npos)
return;
// REVIEW alexeyk: only .zip container support for now.
#ifdef USE_ZIP
assert(atPos > 0);
assert(atPos + 1 < path.length());
// REVIEW alexeyk: only .zip container support for now.
auto containerPath = path.substr(0, atPos);
// skip @ symbol and path separator (/ or \)
auto itemPath = path.substr(atPos + 2);
Expand All @@ -233,6 +234,11 @@ void ImageDataDeserializer::RegisterByteReader(size_t seqId, const std::string&
}
reader->Register(seqId, itemPath);
m_readers[seqId] = reader;
#else
UNUSED(seqId);
UNUSED(knownReaders);
RuntimeError("The code is built without zip container support. Only plain image files are supported.");
#endif
}

cv::Mat ImageDataDeserializer::ReadImage(size_t seqId, const std::string& path)
Expand Down

0 comments on commit 467520a

Please sign in to comment.