Skip to content

Commit 85de2e3

Browse files
committed
Upload file
1 parent 0804899 commit 85de2e3

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

common/src/main/java/com/omarea/common/shell/ShellTranslation.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ShellTranslation(val context: Context) {
7878
intent.putExtra(Intent.EXTRA_STREAM, uri)
7979
intent.clipData = ClipData.newRawUri(null, uri)
8080
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
81-
intent.data = null
81+
// intent.data = null
8282
}
8383
}
8484

@@ -306,7 +306,18 @@ class ShellTranslation(val context: Context) {
306306
}
307307
return intent
308308
}
309-
309+
310+
private fun stripQuote(s: String): String {
311+
if (s.length >= 2) {
312+
val first = s.first()
313+
val last = s.last()
314+
if ((first == '"' && last == '"') || (first == '\'' && last == '\'')) {
315+
return s.substring(1, s.length - 1)
316+
}
317+
}
318+
return s
319+
}
320+
310321
private fun splitArgs(args: String): List<String> {
311322
val out = ArrayList<String>()
312323
val cur = StringBuilder()

0 commit comments

Comments
 (0)