IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23272


Ignore:
Timestamp:
Mar 11, 2009, 11:46:17 AM (17 years ago)
Author:
Paul Price
Message:

Want filenames in the RUN metadata to be the names before they're unmangled (e.g., want neb://wherever instead of /path/to/wherever). Added new element to pmFPAfile to hold the unmangled name.

Location:
trunk/psModules/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfile.c

    r22699 r23272  
    5050
    5151    psFree (file->filename);
     52    psFree (file->origname);
    5253    psFree (file->extname);
    5354
     
    8889
    8990    file->filename = NULL;
     91    file->origname = NULL;
    9092    file->extname  = NULL;
    9193
  • trunk/psModules/src/camera/pmFPAfile.h

    r21363 r23272  
    9191    char *name;                         // the name of the rule (useful for debugging / tracing)
    9292    char *filename;                     // the current name of an active file
     93    char *origname;                     // the original name (before mangling) of an active file
    9394    char *extname;                      // the current name of an active file extension
    9495
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r23244 r23272  
    740740    // apply filename mangling rules (file://, path://, neb://)
    741741    bool create = file->mode == PM_FPA_MODE_WRITE ? true : false;
    742     psString tmpName = pmConfigConvertFilename (file->filename, config, create, false);
    743     if (!tmpName) {
     742    psString realName = pmConfigConvertFilename(file->filename, config, create, false);
     743    if (!realName) {
    744744        psError(PS_ERR_IO, false, "failed to determine real name from template for %s\n", file->filename);
    745745        return false;
    746746    }
    747     psFree (file->filename);
    748     file->filename = tmpName;
     747    psFree(file->origname);
     748    file->origname = file->filename;
     749    file->filename = realName;
    749750
    750751    switch (file->type) {
  • trunk/psModules/src/config/pmConfigRun.c

    r23268 r23272  
    5151
    5252    const char *name = file->name;      // Name of symbolic file
    53     const char *value = file->filename; // Value of symbolic file: the file name
     53    const char *value = file->origname ? file->origname : file->filename; // The file (system) name
    5454
    5555    psString regex = NULL;              // Regular expression for iteration
Note: See TracChangeset for help on using the changeset viewer.