mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-26 16:04:07 +08:00
backport fix #235
This commit is contained in:
parent
aab9ae9e35
commit
9a66ea0fb6
@ -26,6 +26,8 @@ import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.models.Files;
|
||||
import org.mian.gitnex.util.AppUtil;
|
||||
import org.mian.gitnex.util.TinyDB;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
|
||||
@ -76,6 +78,19 @@ public class FileViewActivity extends AppCompatActivity {
|
||||
initCloseListener();
|
||||
closeActivity.setOnClickListener(onClickListener);
|
||||
|
||||
try {
|
||||
|
||||
singleFileName = URLDecoder.decode(singleFileName, "UTF-8");
|
||||
singleFileName = singleFileName.replaceAll("//", "/");
|
||||
|
||||
}
|
||||
catch (UnsupportedEncodingException e) {
|
||||
|
||||
assert singleFileName != null;
|
||||
Log.i("singleFileName", singleFileName);
|
||||
|
||||
}
|
||||
|
||||
getSingleFileContents(instanceUrl, instanceToken, repoOwner, repoName, singleFileName);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user