Changeset 22707
- Timestamp:
- Feb 27, 2009, 11:08:58 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadataConfig.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadataConfig.c
r21390 r22707 821 821 status = 0; 822 822 strValue = getToken (&linePtr, "#", &status, true); 823 823 824 824 if (!status && strValue) { 825 // found a directive, what does it say?826 if (strcasecmp (strValue, "UPDATE") && strcasecmp (strValue, "RESET")) {827 psError(PS_ERR_IO, true, _("Invalid directive %s for METADATA or MULTI."), strValue);828 psFree(strType);829 psFree(strValue);830 return false;831 }832 833 // found a directive, what does it say?834 if (!strcasecmp (strValue, "UPDATE")) {835 // this folder or group is merged with an existing one of the same name836 flags |= PS_META_UPDATE_FOLDER;837 }838 if (!strcasecmp (strValue, "RESET")) {839 // this folder or group replaces an existing one of the same name840 flags |= PS_META_REPLACE;841 }842 psFree(strValue);843 strValue = NULL;844 }825 // found a directive, what does it say? 826 if (strcasecmp (strValue, "UPDATE") && strcasecmp (strValue, "RESET")) { 827 psError(PS_ERR_IO, true, _("Invalid directive %s for METADATA or MULTI."), strValue); 828 psFree(strType); 829 psFree(strValue); 830 return false; 831 } 832 833 // found a directive, what does it say? 834 if (!strcasecmp (strValue, "UPDATE")) { 835 // this folder or group is merged with an existing one of the same name 836 flags |= PS_META_UPDATE_FOLDER; 837 } 838 if (!strcasecmp (strValue, "RESET")) { 839 // this folder or group replaces an existing one of the same name 840 flags |= PS_META_REPLACE; 841 } 842 psFree(strValue); 843 strValue = NULL; 844 } 845 845 846 846 // Not all lines will have comments, so NULL is ok. … … 887 887 return false; 888 888 } 889 } 889 } 890 890 891 891 #define PARSE_ADD_CASE(NAME, TYPE, PARSEFUNC) \ … … 1241 1241 psError(PS_ERR_IO, true, _("failed to parse file '%s'"), filename); 1242 1242 psFree(md); 1243 psFree(file);1243 psFree(file); 1244 1244 return NULL; 1245 1245 } … … 1516 1516 } 1517 1517 psString timeStr = psTimeToISO(time); 1518 psString timeOutput; 1519 timeOutput = psStringNCopy(timeStr, 19); 1520 psStringAppend(&content, "%s", timeOutput); 1521 psStringAppend(&content, "Z"); 1518 psStringAppend(&content, "%s", timeStr); 1522 1519 psFree(timeStr); 1523 psFree(timeOutput);1524 1520 } else { 1525 1521 // psTime is a NULL pointer
Note:
See TracChangeset
for help on using the changeset viewer.
