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

Commit 0369a26d authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

add path separator to SynchronizableFileInfo localPath

parent a86f6d38
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4,7 +4,10 @@ import android.support.annotation.NonNull;
import android.util.Log;


import com.owncloud.android.lib.resources.files.FileUtils;

import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -12,6 +15,8 @@ import java.io.InputStream;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;


/**
@@ -29,8 +34,12 @@ public class SynchronizableFileInfo implements ISynchronizableContent {
    public SynchronizableFileInfo(@NonNull File file) {

        try {

            this.hash = file.lastModified()+"";
            this.localPath = file.getCanonicalPath();
            if(file.isDirectory()){
                this.localPath+= FileUtils.PATH_SEPARATOR;
            }
            this.isFolder = file.isDirectory();
            this.lastModified = file.lastModified();
        }catch (Exception e){
@@ -39,6 +48,9 @@ public class SynchronizableFileInfo implements ISynchronizableContent {
        }
    }




    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;