- Switched to NAPI-3.0 with XML support
- Fixed exeman to write files by default into the first directory in batchpath - Fixed a bug in nxdict which prevented it from handling attributes containing :/ properly - Removed junk files - Fixed a bug in hklscan.c which made it dump core - Added XML support to nxscript.c - Added support for writing NeXus-XML data files to tasub
This commit is contained in:
15
exeman.c
15
exeman.c
@ -391,6 +391,7 @@ static int appendLine(pExeMan self, SConnection *pCon,
|
||||
static int uploadSave(pExeMan self, SConnection *pCon,
|
||||
int argc, char *argv[]){
|
||||
int status;
|
||||
char pPath[256], *pPtr;
|
||||
|
||||
if(SCGetRights(pCon) > usUser){
|
||||
SCWrite(pCon,"ERROR: no permission to save buffers",eError);
|
||||
@ -404,7 +405,19 @@ static int uploadSave(pExeMan self, SConnection *pCon,
|
||||
SCWrite(pCon,"ERROR: no upload buffer to save exists",eError);
|
||||
return 0;
|
||||
}
|
||||
status = exeBufSave(self->uploadBuffer,argv[2]);
|
||||
if(argv[2][0] != '/') {
|
||||
pPtr = self->batchPath;
|
||||
pPtr = stptok(pPtr,pPath,131,":");
|
||||
if(strlen(pPath) + 1 + strlen(argv[2]) <= 256){
|
||||
strcat(pPath,"/");
|
||||
strcat(pPath,argv[2]);
|
||||
} else {
|
||||
strncpy(pPath,argv[2],255);
|
||||
}
|
||||
} else {
|
||||
strncpy(pPath,argv[2],131);
|
||||
}
|
||||
status = exeBufSave(self->uploadBuffer,pPath);
|
||||
if(status == 0){
|
||||
SCWrite(pCon,"ERROR: failed to save exe buffer, destroyed...",eError);
|
||||
}
|
||||
|
Reference in New Issue
Block a user