Skip to content
Snippets Groups Projects
Verified Commit 2baeefa6 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

MAINT: fix merge conflicts

parent ef175fdd
No related branches found
No related tags found
1 merge request!73Draft: file system: cleanup
Pipeline #46452 failed
...@@ -47,6 +47,8 @@ import org.caosdb.server.entity.Message; ...@@ -47,6 +47,8 @@ import org.caosdb.server.entity.Message;
import org.caosdb.server.entity.RetrieveEntity; import org.caosdb.server.entity.RetrieveEntity;
import org.caosdb.server.entity.StatementStatus; import org.caosdb.server.entity.StatementStatus;
import org.caosdb.server.entity.wrapper.Property; import org.caosdb.server.entity.wrapper.Property;
import org.caosdb.server.filesystem.Hash;
import org.caosdb.server.filesystem.Hasher;
public class DatabaseUtils { public class DatabaseUtils {
...@@ -229,7 +231,7 @@ public class DatabaseUtils { ...@@ -229,7 +231,7 @@ public class DatabaseUtils {
ret.filePath = bytes2UTF8(rs.getBytes("FilePath")); ret.filePath = bytes2UTF8(rs.getBytes("FilePath"));
ret.fileSize = rs.getLong("FileSize"); ret.fileSize = rs.getLong("FileSize");
ret.fileHash = bytes2UTF8(rs.getBytes("FileHash")); ret.fileHash = Hash.create(rs.getString("FileHash"), 0, Hasher.SHA512);
ret.versionId = bytes2UTF8(rs.getBytes("Version")); ret.versionId = bytes2UTF8(rs.getBytes("Version"));
return ret; return ret;
......
...@@ -65,7 +65,7 @@ public class MySQLInsertSparseEntity extends MySQLTransaction implements InsertS ...@@ -65,7 +65,7 @@ public class MySQLInsertSparseEntity extends MySQLTransaction implements InsertS
insertFilePropsStmt.setString(2, entity.filePath); insertFilePropsStmt.setString(2, entity.filePath);
insertFilePropsStmt.setLong(3, entity.fileSize); insertFilePropsStmt.setLong(3, entity.fileSize);
if (entity.fileHash != null) { if (entity.fileHash != null) {
insertFilePropsStmt.setString(4, entity.fileHash); insertFilePropsStmt.setString(4, entity.fileHash.toString());
} else { } else {
insertFilePropsStmt.setNull(4, Types.VARCHAR); insertFilePropsStmt.setNull(4, Types.VARCHAR);
} }
......
...@@ -86,7 +86,8 @@ public final class Hash implements Serializable { ...@@ -86,7 +86,8 @@ public final class Hash implements Serializable {
public String getAlgorithm() { public String getAlgorithm() {
return algorithm; return algorithm;
}; }
;
@Override @Override
public String toString() { public String toString() {
......
...@@ -101,10 +101,10 @@ public class FileSystemResource extends AbstractCaosDBServerResource { ...@@ -101,10 +101,10 @@ public class FileSystemResource extends AbstractCaosDBServerResource {
if (child.isDirectory()) { if (child.isDirectory()) {
celem = new Element("dir"); celem = new Element("dir");
celem.setAttribute("name", child.getName()); celem.setAttribute("name", child.getName());
celem.setAttribute("url", referenceString + child.getName() + "/"); celem.setAttribute("url", url + child.getName() + "/");
} else { } else {
celem = getFileElement(specifier, child); celem = getFileElement(specifier, child);
celem.setAttribute("url", referenceString + child.getName()); celem.setAttribute("url", url + child.getName());
} }
folder.addContent(celem); folder.addContent(celem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment