Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Switch to stdlib API for getRelativePath
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
  • Loading branch information
msfjarvis committed Jun 12, 2020
1 parent e96e896 commit 392edb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ open class BasePgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBou
* Gets the relative path to the repository
*/
fun getRelativePath(fullPath: String, repositoryPath: String): String =
fullPath.replace(repositoryPath, "").replace("/+".toRegex(), "/")
File(fullPath).relativeTo(File(repositoryPath)).path

/**
* Gets the Parent path, relative to the repository
Expand Down

0 comments on commit 392edb7

Please sign in to comment.