Changeset 16310 for gsdl/trunk/src/colservr/filter.cpp
- Timestamp:
- 2008-07-09T13:12:15+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/colservr/filter.cpp
r15587 r16310 27 27 #include "fileutil.h" 28 28 #include <assert.h> 29 30 #include <iostream> 31 using namespace std; 29 32 30 33 … … 46 49 else if (key == "collectdir") collectdir = value; 47 50 else if (key == "gsdlhome") gsdlhome = value; 51 else if (key == "collecthome") collecthome = value; 48 52 else if (key == "gdbmhome") dbhome = value; 49 53 else if ((key == "filteroptdefault") && (cfgline.size() == 2)) { … … 56 60 } 57 61 } 62 63 text_t filterclass::resolve_db_filename(const text_t& idx, 64 const text_t& file_ext) 65 { 66 text_t resolved_filename; 67 68 if (gsdlhome==dbhome) { 69 // dbhome has defaulted to gsdlhome which we take to means the 70 // database has been specifically moved out of gsdlhome area. 71 // => it should be whereever collecthome is set to 72 resolved_filename = filename_cat(collecthome, collection, "index", "text", idx); 73 } 74 else { 75 // dbhome is explicitly set to something other than gsdlhome 76 // => use dbhome 77 resolved_filename = filename_cat(dbhome, "collect", collection, "index", "text", idx); 78 } 79 80 resolved_filename += file_ext; 81 82 return resolved_filename; 83 } 84 58 85 59 86 // init should be called after all the configuration is done but … … 70 97 } 71 98 99 if (collecthome.empty()) collecthome = filename_cat(gsdlhome,"collect"); 72 100 if (dbhome.empty()) dbhome = gsdlhome; 73 101 74 102 // get the collection directory name 75 103 if (collectdir.empty()) { 76 collectdir = filename_cat ( gsdlhome, "collect", collection);104 collectdir = filename_cat (collecthome, collection); 77 105 } 78 106
Note:
See TracChangeset
for help on using the changeset viewer.