Revision 47779 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/SQLiteStoreParameters.java
SQLiteStoreParameters.java | ||
---|---|---|
22 | 22 |
package org.gvsig.sqlite.dal; |
23 | 23 |
|
24 | 24 |
import java.io.File; |
25 |
import java.io.IOException; |
|
25 | 26 |
import java.util.Properties; |
27 |
import org.apache.commons.io.FilenameUtils; |
|
28 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
26 | 29 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
27 | 30 |
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParametersBase; |
28 | 31 |
|
... | ... | |
83 | 86 |
public void setFile(File database) { |
84 | 87 |
this.helper.setFile(database); |
85 | 88 |
} |
89 |
|
|
90 |
@Override |
|
91 |
public boolean isTheSameStore(DataStoreParameters params) { |
|
92 |
if(!(params instanceof SQLiteStoreParameters)){ |
|
93 |
return false; |
|
94 |
} |
|
95 |
File f1 = SQLiteUtils.normalizeFile(this.getFile()); |
|
96 |
File f2 = SQLiteUtils.normalizeFile(((SQLiteStoreParameters)params).getFile()); |
|
97 |
try { |
|
98 |
if(!FilenameUtils.equalsOnSystem(f1.getCanonicalPath(), f2.getCanonicalPath())){ |
|
99 |
return false; |
|
100 |
} |
|
101 |
} catch (IOException ex) { |
|
102 |
if(!FilenameUtils.equalsOnSystem(f1.getAbsolutePath(), f2.getAbsolutePath())){ |
|
103 |
return false; |
|
104 |
} |
|
105 |
} |
|
106 |
return super.isTheSameStore(params); |
|
107 |
|
|
108 |
} |
|
109 |
|
|
86 | 110 |
|
87 | 111 |
} |
Also available in: Unified diff