Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a86f6d38 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

replace hash in synchronizableFileInfo by lastModified

parent ba13897a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ public class SynchronizableFileInfo implements ISynchronizableContent {
    public SynchronizableFileInfo(@NonNull File file) {

        try {
            this.hash = calcHash(file);
            this.hash = file.lastModified()+"";
            this.localPath = file.getCanonicalPath();
            this.isFolder = file.isDirectory();
            this.lastModified = file.lastModified();
@@ -39,8 +39,8 @@ public class SynchronizableFileInfo implements ISynchronizableContent {
        }
    }

    public SynchronizableFileInfo(String hash, String localPath, long lastModified, boolean isFolder){
        this.hash = hash;
    public SynchronizableFileInfo(String localPath, long lastModified, boolean isFolder){
        this.hash = lastModified+""; //TODO DOESN'T WORK FOR FOLDER. MAY BE LASTMODIFIED TMS IS SUFFISANT
        this.localPath = localPath;
        this.isFolder = isFolder;
        this.lastModified = lastModified;
@@ -100,6 +100,9 @@ public class SynchronizableFileInfo implements ISynchronizableContent {
            }
    /*else {
            //TODO gérer le hash d'un dossier!
            //May be path+lastmodified+dateCreation


        }*/
            byte[] buffer = new byte[8192];
            int read;