Project

General

Profile

« Previous | Next » 

Revision 4183

Added by daigle over 16 years ago

Create data and inline data directories

View differences:

src/edu/ucsb/nceas/metacat/admin/PropertiesAdmin.java
107 107
						.discoverServerPort(request));
108 108
				PropertyService.setPropertyNoPersist("server.httpSSLPort",
109 109
						SystemUtil.discoverServerSSLPort(request));
110
				// TODO MCD see if you can find tomcat dir if it is not the same as deployDir
111 110
				PropertyService.setPropertyNoPersist("application.deployDir",
112
						SystemUtil.discoverTomcatDir(request));
111
						SystemUtil.discoverDeployDir(request));
113 112

  
114 113
				PropertyService.persistProperties();
115 114

  
......
185 184
					logMetacat.error(errorString);
186 185
					validationErrors.add(errorString);
187 186
				}
187
				
188
				// Try to create data directories if necessary.
189
				String dataDir = PropertyService.getProperty("application.datafilepath");
190
				if (!FileUtil.createDirectory(dataDir)) {
191
					String errorString = "Could not create directory: " + dataDir;
192
					logMetacat.error(errorString);
193
					validationErrors.add(errorString);
194
				}
195
				
196
				// Try to create inline-data directories if necessary.
197
				String inlineDataDir = PropertyService.getProperty("application.inlinedatafilepath");
198
				if (!FileUtil.createDirectory(inlineDataDir)) {
199
					String errorString = "Could not create directory: " + inlineDataDir;
200
					logMetacat.error(errorString);
201
					validationErrors.add(errorString);
202
				}
188 203

  
189 204
				// write the backup properties to a location outside the 
190 205
				// application directories so they will be available after

Also available in: Unified diff