mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
default_image_folder cannot be an empty string, removed obsolete check
This commit is contained in:
@@ -747,8 +747,8 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pbDevice, const PbOperation op
|
|||||||
}
|
}
|
||||||
catch(const io_exception& e) {
|
catch(const io_exception& e) {
|
||||||
// If the file does not exist search for it in the default image folder
|
// If the file does not exist search for it in the default image folder
|
||||||
string file = default_image_folder + "/" + filename;
|
string default_file = default_image_folder + "/" + filename;
|
||||||
filepath.SetPath(file.c_str());
|
filepath.SetPath(default_file.c_str());
|
||||||
try {
|
try {
|
||||||
fileSupport->Open(filepath);
|
fileSupport->Open(filepath);
|
||||||
}
|
}
|
||||||
@@ -887,7 +887,6 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pbDevice, const PbOperation op
|
|||||||
fileSupport->Open(filepath);
|
fileSupport->Open(filepath);
|
||||||
}
|
}
|
||||||
catch(const io_exception& e) {
|
catch(const io_exception& e) {
|
||||||
if (!default_image_folder.empty()) {
|
|
||||||
// If the file does not exist search for it in the default image folder
|
// If the file does not exist search for it in the default image folder
|
||||||
string default_file = default_image_folder + "/" + filename;
|
string default_file = default_image_folder + "/" + filename;
|
||||||
filepath.SetPath(default_file.c_str());
|
filepath.SetPath(default_file.c_str());
|
||||||
@@ -898,10 +897,6 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pbDevice, const PbOperation op
|
|||||||
return ReturnStatus(fd, false, "Tried to open an invalid file '" + filename + "': " + e.getmsg());
|
return ReturnStatus(fd, false, "Tried to open an invalid file '" + filename + "': " + e.getmsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return ReturnStatus(fd, false, "No default image folder");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user