Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackupFolder #958

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

BackupFolder #958

wants to merge 25 commits into from

Conversation

maxiaoping
Copy link
Contributor

Added the local folder backup function

this.email=email;
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了空行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

return false;

RepoConfig that = (RepoConfig) obj;
if(that.repoID == null || that.repoName == null || that.email == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“if(t” -> "if (t" , if 后面需要有空格

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

import java.util.ArrayList;
import java.util.List;

public class FolderCloudLibraryFragment extends Fragment {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FolderCloudLibraryFragment -> CloudLibraryChooserFragment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@@ -1021,17 +1022,17 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin

private void showWifiDialog() {

String[]colors={"WIFI",getActivity().getString(R.string.folder_backup_mode)};
String[]buckModes={"WIFI",getActivity().getString(R.string.folder_backup_mode)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"String[]buckModes=". 这里少了不少空格

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@Override
public void onDirectoryCreate(File directory) {
backupFile();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了空行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改


}

class FolderFileMonitor implements FileAlterationListener {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FolderFileMonitor -> FolderMonitor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

}
}

public void backupFile() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backupFile -> backupFolders

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

this.fileSize = fileSize;
}

public boolean canLocalDecrypt() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分可以去掉。目前不需要支持备份到加密资料库。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@coxtor
Copy link

coxtor commented Mar 23, 2023

Thanks for the implementation however, this PR breaks at least manual file upload with error :

I/LoggingInterceptor: {"error": "Invalid relative path."}
E/UploadTask: Upload exception 599 File upload failed
W/System.err: SeafException{code=599, msg=File upload failed}
W/System.err:     at com.seafile.seadroid2.SeafConnection.uploadFileCommon(SeafConnection.java:926)
W/System.err:     at com.seafile.seadroid2.SeafConnection.uploadFile(SeafConnection.java:884)
W/System.err:     at com.seafile.seadroid2.data.DataManager.uploadFileCommon(DataManager.java:714)
W/System.err:     at com.seafile.seadroid2.data.DataManager.uploadFile(DataManager.java:708)
W/System.err:     at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:97)
W/System.err:     at com.seafile.seadroid2.transfer.UploadTask.doInBackground(UploadTask.java:23)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants