Skip to content

Commit

Permalink
Trim forward slash in file path substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-gibson committed May 24, 2022
1 parent 0ffcb4f commit 5b6f5a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# GitLink Changelog

## [Unreleased]
- Trim forward slash character in file path substitution

## [4.1.5]
- Revert host detection fix
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pluginGroup = uk.co.ben_gibson.git.link
pluginName = GitLink
# SemVer format -> https://semver.org
pluginVersion = 4.1.5
pluginVersion = 4.1.6

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/uk/co/ben_gibson/git/link/git/File.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class File(val name: String, val isDirectory: Boolean, val path: String, va
return File(
file.name,
file.isDirectory,
file.path.substring(repository.root.path.length).replace(file.name, "").trimEnd('/'),
file.path.substring(repository.root.path.length).replace(file.name, "").trim('/'),
file.path == repository.root.path
)
}
Expand Down

0 comments on commit 5b6f5a2

Please sign in to comment.