Changed: Rename UriUtils getUriFilePath() to getUriFilePathWithFragment()

This commit is contained in:
agnostic-apollo
2022-01-22 18:44:56 +05:00
parent 1f3d3616a4
commit 3898ebdc74
4 changed files with 11 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ public class TermuxOpenReceiver extends BroadcastReceiver {
}
// Get full path including fragment (anything after last "#")
String filePath = UriUtils.getUriFilePath(data);
String filePath = UriUtils.getUriFilePathWithFragment(data);
final File fileToShare = new File(filePath);
if (!(fileToShare.isFile() && fileToShare.canRead())) {

View File

@@ -351,11 +351,11 @@ public final class TermuxService extends Service implements AppShell.AppShellCli
Logger.logVerbose(LOG_TAG, "uri: \"" + executionCommand.executableUri + "\", path: \"" + executionCommand.executableUri.getPath() + "\", fragment: \"" + executionCommand.executableUri.getFragment() + "\"");
// Get full path including fragment (anything after last "#")
executionCommand.executable = UriUtils.getUriFilePath(executionCommand.executableUri);
executionCommand.executable = UriUtils.getUriFilePathWithFragment(executionCommand.executableUri);
executionCommand.arguments = IntentUtils.getStringArrayExtraIfSet(intent, TERMUX_SERVICE.EXTRA_ARGUMENTS, null);
if (executionCommand.inBackground)
executionCommand.stdin = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_STDIN, null);
executionCommand.backgroundCustomLogLevel = IntentUtils.getIntegerExtraIfSet(intent, TERMUX_SERVICE.EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL, null);
executionCommand.backgroundCustomLogLevel = IntentUtils.getIntegerExtraIfSet(intent, TERMUX_SERVICE.EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL, null);
}
executionCommand.workingDirectory = IntentUtils.getStringExtraIfSet(intent, TERMUX_SERVICE.EXTRA_WORKDIR, null);

View File

@@ -99,7 +99,7 @@ public class TermuxFileReceiverActivity extends Activity {
Logger.logVerbose(LOG_TAG, "uri: \"" + dataUri + "\", path: \"" + dataUri.getPath() + "\", fragment: \"" + dataUri.getFragment() + "\"");
// Get full path including fragment (anything after last "#")
String path = UriUtils.getUriFilePath(dataUri);
String path = UriUtils.getUriFilePathWithFragment(dataUri);
if (DataUtils.isNullOrEmpty(path)) {
showErrorDialogAndQuit("File path from data uri is null, empty or invalid.");
return;