aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/odr-padenc.cpp6
-rw-r--r--src/sls.cpp5
2 files changed, 4 insertions, 7 deletions
diff --git a/src/odr-padenc.cpp b/src/odr-padenc.cpp
index 2779547..cde6ca9 100644
--- a/src/odr-padenc.cpp
+++ b/src/odr-padenc.cpp
@@ -299,10 +299,8 @@ int PadEncoder::Main() {
fprintf(stderr, "ODR-PadEnc Error: cannot encode file '%s'\n", slide.filepath.c_str());
if (options.erase_after_tx) {
- if (unlink(slide.filepath.c_str()) == -1) {
- fprintf(stderr, "ODR-PadEnc Error: erasing file '%s' failed: ", slide.filepath.c_str());
- perror("");
- }
+ if (unlink(slide.filepath.c_str()) == -1)
+ perror(("ODR-PadEnc Error: erasing file '" + slide.filepath +"' failed").c_str());
}
// while flushing, insert DLS (if present) after a certain PAD amout
diff --git a/src/sls.cpp b/src/sls.cpp
index aa0167f..f059114 100644
--- a/src/sls.cpp
+++ b/src/sls.cpp
@@ -121,7 +121,7 @@ bool SlideStore::InitFromDir(const std::string& dir) {
struct dirent** dir_entries;
int dir_count = scandir(dir.c_str(), &dir_entries, FilterSlides, alphasort);
if(dir_count < 0) {
- perror("ODR-PadEnc Error: cannot open slides directory");
+ perror(("ODR-PadEnc Error: cannot open slides directory '" + dir + "'").c_str());
return false;
}
@@ -462,8 +462,7 @@ bool SLSManager::encodeFile(const std::string& fname, int fidx, bool raw_slides)
// read file
FILE* pFile = fopen(fname.c_str(), "rb");
if (pFile == NULL) {
- fprintf(stderr, "ODR-PadEnc Error: Unable to load file '%s'\n",
- fname.c_str());
+ perror(("ODR-PadEnc Error: Unable to load file '" + fname + "'").c_str());
goto encodefile_out;
}