Skip to content

Commit

Permalink
Merge pull request #2130 from TeamAmaze/bugfix/2113
Browse files Browse the repository at this point in the history
Bugfix/2113
  • Loading branch information
VishalNehra committed Dec 12, 2020
2 parents 706237a + 3b2df61 commit 9bab9c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
case R.id.menu_item_share_error:
final Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, buildJson());
intent.putExtra(Intent.EXTRA_TEXT, buildMarkdown());
intent.setType("text/plain");
startActivity(Intent.createChooser(intent, getString(R.string.share)));
break;
Expand All @@ -271,7 +271,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
}

private void sendReportEmail() {
final Intent i = Utils.buildEmailIntent(buildJson());
final Intent i = Utils.buildEmailIntent(buildMarkdown());
if (i.resolveActivity(getPackageManager()) != null) {
startActivity(i);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public HybridFile(OpenMode mode, String path) {
public HybridFile(OpenMode mode, String path, String name, boolean isDirectory) {
this(mode, path);
if (path.startsWith(SMB_URI_PREFIX) || isSmb()) {
Uri.Builder pathBuilder = Uri.parse(this.path).buildUpon().appendPath(name);
if (isDirectory) pathBuilder.appendPath("/");
Uri.Builder pathBuilder = Uri.parse(this.path).buildUpon().appendEncodedPath(name);
if (isDirectory) pathBuilder.appendEncodedPath("/");
this.path = pathBuilder.build().toString();
} else if (path.startsWith(SSH_URI_PREFIX) || isSftp()) {
this.path += "/" + name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected Void doInBackground(Void... params) {
// check whether file names for new file are valid or recursion occurs.
// If rename is on OTG, we are skipping
if (!(oldFile.mode.equals(newFile.mode) && oldFile.mode.equals(OpenMode.OTG))
&& !Operations.isFileNameValid(newFile.getSimpleName())) {
&& !Operations.isFileNameValid(newFile.getName(context))) {
errorCallBack.invalidName(newFile);
return null;
}
Expand Down Expand Up @@ -513,7 +513,7 @@ public <Void> Void execute(@NonNull SFTPClient client) {
errorCallBack.exists(newFile);
return null;
}
errorCallBack.done(newFile, oldDocumentFile.renameTo(newFile.getSimpleName()));
errorCallBack.done(newFile, oldDocumentFile.renameTo(newFile.getName(context)));
return null;
} else {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,11 @@ public void rename(final HybridFileParcelable f) {
.rename(
openMode,
f.getPath(),
Uri.parse(CURRENT_PATH).buildUpon().appendPath(name1).build().toString(),
Uri.parse(CURRENT_PATH)
.buildUpon()
.appendEncodedPath(name1)
.build()
.toString(),
getActivity(),
getMainActivity().isRootExplorer());
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void mkdir(final OpenMode openMode, final String path, final MainFragment
openMode,
Uri.parse(path)
.buildUpon()
.appendPath(textfield.getText().toString())
.appendEncodedPath(textfield.getText().toString())
.build()
.toString()),
ma);
Expand Down Expand Up @@ -184,7 +184,7 @@ public void mkfile(final OpenMode openMode, final String path, final MainFragmen
openMode,
Uri.parse(path)
.buildUpon()
.appendPath(textfield.getText().toString())
.appendEncodedPath(textfield.getText().toString())
.build()
.toString()),
ma);
Expand Down

0 comments on commit 9bab9c0

Please sign in to comment.