mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-02 10:50:05 +02:00
somewhere
This commit is contained in:
parent
1e94ec0c6a
commit
300b014f73
@ -285,7 +285,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
||||
/**
|
||||
* Set File Path
|
||||
* Checks for file directory existence before setting file path,
|
||||
* If it doesn't exist, it will set it blank
|
||||
* If it exists, it sets it
|
||||
* @param c file path (max of 1000 characters)
|
||||
*/
|
||||
void setFilePath(const char c[]);
|
||||
|
@ -122,7 +122,8 @@ public:
|
||||
GET_FILE_FORMAT=-1,/**< the receiver will return its file format */
|
||||
BINARY, /**< binary format */
|
||||
ASCII, /**< ascii format */
|
||||
HDF5 /**< hdf5 format */
|
||||
HDF5, /**< hdf5 format */
|
||||
NUM_FILE_FORMATS
|
||||
};
|
||||
|
||||
|
||||
|
@ -269,16 +269,14 @@ void UDPBaseImplementation::setFileName(const char c[]){
|
||||
void UDPBaseImplementation::setFilePath(const char c[]){
|
||||
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||
|
||||
|
||||
if(strlen(c)){
|
||||
//check if filepath exists
|
||||
struct stat st;
|
||||
if(stat(c,&st) == 0)
|
||||
strcpy(filePath,c);
|
||||
else{
|
||||
strcpy(filePath,"");
|
||||
else
|
||||
FILE_LOG(logWARNING) << "FilePath does not exist: " << filePath;
|
||||
}
|
||||
strcpy(filePath, c);
|
||||
}
|
||||
FILE_LOG(logDEBUG) << "Info: File path: " << filePath;
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ int slsReceiverTCPIPInterface::set_file_dir() {
|
||||
else{
|
||||
receiverBase->setFilePath(fPath);
|
||||
retval = receiverBase->getFilePath();
|
||||
if(retval == NULL){
|
||||
if (retval == NULL || (strlen(fPath) && strcasecmp(fPath, retval))) {
|
||||
ret = FAIL;
|
||||
strcpy(mess,"receiver file path does not exist\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user