Skip to content

Commit 530bfc4

Browse files
committed
Merge commit '63587251f4a8869d1da21b729410a724fdddffb5'
2 parents d279ca3 + 6358725 commit 530bfc4

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repositories {
3535
//----------------------------------------------------------------
3636

3737
// The Project version
38-
version = '4.1.7'
38+
version = '4.1.8'
3939

4040
// Setup java compilation version
4141
sourceCompatibility = 1.8

src/main/java/picoded/dstack/mongodb/MongoDB_FileWorkspaceMap.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -707,27 +707,27 @@ public boolean backend_fileExist(String oid, String filepath) {
707707
public void backend_moveFile(String oid, String sourceFile, String destinationFile) {
708708

709709
// in mongodb gridFS, "move" is performed by updating the "filename" metadata
710-
710+
711711
// first, check that the source file exists
712-
if(!backend_fileExist(oid, sourceFile)){
712+
if (!backend_fileExist(oid, sourceFile)) {
713713
throw new RuntimeException("Source file does not exist: " + sourceFile);
714714
}
715715

716716
// then, ensure that file at destination does not exists
717-
if(backend_fileExist(oid, destinationFile)){
717+
if (backend_fileExist(oid, destinationFile)) {
718718
throw new RuntimeException("Destination file already exists: " + destinationFile);
719719
}
720-
720+
721721
// finally, perform the "move" by updating the filename metadata of the source file to the destination file
722-
722+
723723
String sourceFullPath = oid + "/" + sourceFile;
724724
String destinationFullPath = oid + "/" + destinationFile;
725-
725+
726726
Bson query = Filters.eq("filename", sourceFullPath);
727727
Bson update = new Document("$set", new Document("filename", destinationFullPath));
728-
729-
gridFSBucket.getFilesCollection().updateOne(query, update);
730-
728+
729+
filesCollection.updateOne(query, update);
730+
731731
}
732732

733733
@Override

0 commit comments

Comments
 (0)