View | Details | Raw Unified | Return to bug 136666
Collapse All | Expand All

(-)src/org/eclipse/update/internal/configurator/branding/IniFileReader.java (-23 / +3 lines)
Lines 96-108 Link Here
96
		// Determine the ini file location
96
		// Determine the ini file location
97
		URL iniURL = null;
97
		URL iniURL = null;
98
		IOException ioe = null;
98
		IOException ioe = null;
99
		try {
99
		iniURL = FileLocator.find(bundle, new Path(NLS_TAG).append(iniFilename), null);
100
			iniURL = FileLocator.find(bundle, new Path(NLS_TAG).append(iniFilename), null);
101
			if (iniURL != null)
102
				iniURL = FileLocator.resolve(iniURL);
103
		} catch (IOException e) {
104
			ioe = e;
105
		}
106
		if (iniURL == null) {
100
		if (iniURL == null) {
107
			String message = NLS.bind(Messages.IniFileReader_OpenINIError, (new String[] { iniFilename }));
101
			String message = NLS.bind(Messages.IniFileReader_OpenINIError, (new String[] { iniFilename }));
108
			return new Status(IStatus.ERROR, PID, 0, message, ioe);
102
			return new Status(IStatus.ERROR, PID, 0, message, ioe);
Lines 111-137 Link Here
111
		// Determine the properties file location
105
		// Determine the properties file location
112
		URL propertiesURL = null;
106
		URL propertiesURL = null;
113
		if (propertiesFilename != null & propertiesFilename.length() > 0) {
107
		if (propertiesFilename != null & propertiesFilename.length() > 0) {
114
			try {
108
			propertiesURL = FileLocator.find(bundle, new Path(NLS_TAG).append(propertiesFilename), null);
115
				propertiesURL = FileLocator.find(bundle, new Path(NLS_TAG).append(propertiesFilename), null);
116
				if (propertiesURL != null)
117
					propertiesURL = FileLocator.resolve(propertiesURL);
118
			} catch (IOException e) {
119
				String message = NLS.bind(Messages.IniFileReader_OpenPropError, (new String[] { propertiesFilename }));
120
				return new Status(IStatus.ERROR, PID, 0, message, e);
121
			}
122
		}
109
		}
123
110
124
		// Determine the mappings file location
111
		// Determine the mappings file location
125
		URL mappingsURL = null;
112
		URL mappingsURL = null;
126
		if (mappingsFilename != null && mappingsFilename.length() > 0) {
113
		if (mappingsFilename != null && mappingsFilename.length() > 0) {
127
			try {
114
			mappingsURL = FileLocator.find(bundle, new Path(NLS_TAG).append(mappingsFilename), null);
128
				mappingsURL = FileLocator.find(bundle, new Path(NLS_TAG).append(mappingsFilename), null);
129
				if (mappingsURL != null)
130
					mappingsURL = FileLocator.resolve(mappingsURL);
131
			} catch (IOException e) {
132
				String message = NLS.bind(Messages.IniFileReader_OpenMapError, (new String[] { mappingsFilename }));
133
				return new Status(IStatus.ERROR, PID, 0, message, e);
134
			}
135
		}
115
		}
136
116
137
		// OK to pass null properties and/or mapping file
117
		// OK to pass null properties and/or mapping file

Return to bug 136666