Index: BandSelectorPropertiesListener.java
===================================================================
--- BandSelectorPropertiesListener.java	(revision 4180)
+++ BandSelectorPropertiesListener.java	(revision 4181)
@@ -2,28 +2,29 @@
 *
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
 * of the Valencian Government (CIT)
-* 
+*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
-* 
+*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
-* 
+*
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
-* 
+*
 */
 package org.gvsig.raster.multifile.app.panel;
 
 import java.awt.event.ActionEvent;
 import java.awt.geom.Point2D;
 import java.io.File;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -85,18 +86,18 @@
 	public void init(FLyrRaster lyr) {
 		fLayer = lyr;
 	}
-	
+
 	public RasterDataStore getResult() {
 		return fLayer.getDataStore();
 	}
-	
+
 	/**
 	 * Listener para la gestión de los botones de añadir, eliminar fichero y
 	 * el combo de selección de bandas.
 	 */
 	public void actionPerformed(ActionEvent e) {
 		super.actionPerformed(e);
-		
+
 		if (e.getSource().equals(bandSetupPanel.getNumBandSelectorCombo())) {
 			String vBands = (String) bandSetupPanel.getNumBandSelectorCombo().getSelectedItem();
 			if (vBands != null) {
@@ -133,7 +134,7 @@
 			try {
 				String[] bands = new String[bandSetupPanel.getARGBTable().getRowCount()];
 				ColorInterpretation ci = RasterLocator.getManager().getDataStructFactory().createColorInterpretation(bands);
-				
+
 				// Combinación GRAY
 				if ((numBandToRed == numBandToGreen) && (numBandToRed == numBandToBlue) && (numBandToRed >= 0)) {
 					for (int iBand = 0; iBand < bandSetupPanel.getARGBTable().getRowCount(); iBand++) {
@@ -157,7 +158,7 @@
 		}
 
 		boolean autoRefreshView = Configuration.getValue("general_auto_preview", Boolean.TRUE).booleanValue();
-		
+
 		if (!autoRefreshView)
 			return;
 
@@ -177,15 +178,15 @@
 			File[] files = fileChooser.getSelectedFiles();
 
 			JFileChooser.setLastPath(FilesystemExplorerWizardPanel.OPEN_LAYER_FILE_CHOOSER_ID, files[0]);
-			
+
 			fileList = new ArrayList<File>();
-			
+
 			for (int i = 0; i < files.length; i++) {
 				//Checks that the file does not exist
-				String[] uris = dataStore.getURIByProvider();
+				URI[] uris = dataStore.getURIByProvider();
 				boolean exists = false;
 				for (int j = 0; j < uris.length; j++) {
-					if (uris[j].endsWith(files[i].getName())) {
+					if (uris[j].getPath().endsWith(files[i].getName())) {
 						RasterSwingLibrary.messageBoxError( Messages.getText("fichero_existe") + ": " + files[i].getAbsolutePath(), bandSetupPanel);
 						exists = true;
 						break;
@@ -194,21 +195,21 @@
 				if(!exists)
 					fileList.add(files[i]);
 			}
-			
+
 			if(!checkStoresCompatibility(fLayer.getDataStore(), fileList))
 				return;
-			
+
 			if(dataStore.isMultiFile()) {
 				for (int i = 0; i < fileList.size(); i++) {
 					try {
-						dataStore.addFile(fileList.get(i).getAbsolutePath());
+						dataStore.addFile(fileList.get(i));
 					} catch (InvalidSourceException e) {
 						RasterSwingLibrary.messageBoxError(Messages.getText("addband_error"), bandSetupPanel, e);
 					}
 				}
-				
+
 				dataStore.setProvider(dataStore.getProvider());
-				
+
 				//It shows the files and bands in the panel
 				try {
 					bandSetupPanel.addFiles(dataStore);
@@ -223,7 +224,7 @@
 			}
 		}
 	}
-	
+
 	/**
 	 * Elimina una banda del raster. Si queda solo un fichero o no se ha
 	 * seleccionado ninguna banda no hace nada.
@@ -233,31 +234,31 @@
 	public void delFileBand() {
 		Object[] objects = bandSetupPanel.getFileList().getJList().getSelectedValues();
 		RasterDataStore dataStore = fLayer.getDataStore();
-		
+
 		for (int i = objects.length - 1; i >= 0; i--) {
 			if (bandSetupPanel.getFileList().getNFiles() > 1) {
 				String pathName = objects[i].toString();
-				dataStore.removeFile(pathName);
+				dataStore.removeFile(new File(pathName));
 
 				String file = pathName.substring(pathName.lastIndexOf(File.separator) + 1);
 				file = file.substring(file.lastIndexOf("\\") + 1);
 				bandSetupPanel.removeFile(file);
 			}
 		}
-		
+
 		setNewBandsPositionInRendering();
 	}
-	
+
 	/**
 	 * Catchs the events from LayerNameDialog to get the name of the new layer
 	 */
 	public void actionButtonPressed(ButtonsPanelEvent e) {
 		String layerName = (String)e.getSource();
-	
+
 		RasterDataStore dataStore = fLayer.getDataStore();
 		RasterDataParameters paramFirstFile = (RasterDataParameters)dataStore.getParameters();//(RasterDataParameters)((RasterProvider)dataStore.getProvider()).getDataParameters();
-		String path = paramFirstFile.getURI().substring(0, paramFirstFile.getURI().lastIndexOf(File.separator) + 1);
-		
+		String path = paramFirstFile.getURI().getPath().substring(0, paramFirstFile.getURI().getPath().lastIndexOf(File.separator) + 1);
+
 		ProviderServices provServ = RasterLocator.getManager().getProviderServices();
 		DataManagerProviderServices dataManager = (DataManagerProviderServices)DALLocator.getDataManager();
 
@@ -268,7 +269,7 @@
 
 			//And now it creates and adds the new ones
 			for (int i = 0; i < fileList.size(); i++) {
-				ArrayList<RasterDataParameters> storeParametersList = provServ.createParametersList(fileList.get(i).getAbsolutePath());
+				ArrayList<RasterDataParameters> storeParametersList = provServ.createParametersList(fileList.get(i)); //.getAbsolutePath());
 				for (int j = 0; j < storeParametersList.size(); j++) {
 					DataStoreProvider newFileProv = dataManager.createProvider((DataStoreProviderServices)dataStore, storeParametersList.get(j));
 					newParamsMultifile.addProviderNotTiled(newFileProv);
@@ -285,19 +286,19 @@
 			} catch (NotInitializeException ex) {
 				RasterSwingLibrary.messageBoxError(Messages.getText("table_not_initialize"), this, ex);
 			}
-			
+
 			ArrayList<File> uriList = new ArrayList<File>();
 			uriList.add(new File(paramFirstFile.getURI()));
 			for (int i = 0; i < fileList.size(); i++) {
 				uriList.add(fileList.get(i));
 			}
-			saveMultiFileLayer(layerName, paramFirstFile.getURI(), uriList);
+			saveMultiFileLayer(layerName, paramFirstFile.getURI().getPath(), uriList);
 
 		} catch (Exception exc) {
 			RasterSwingLibrary.messageBoxError(Messages.getText("addband_error"), bandSetupPanel, exc);
 		}
 	}
-	
+
 	/**
 	 * Acciones a ejecutar cuando se aplica
 	 */
@@ -309,7 +310,7 @@
 	public void setNewBandsPositionInRendering() {
 		if (fLayer != null && fLayer.getRender() != null) {
 			fLayer.getRender().setRenderColorInterpretation(bandSetupPanel.getSelectedColorInterpretation());
-			
+
 			int alphaBand = bandSetupPanel.getColorInterpretationByColorBandBand(RasterDataStore.ALPHA_BAND);
 			Transparency gt = fLayer.getRender().getRenderingTransparency();
 			if(gt != null)
