Skip to content

Commit 342b01d

Browse files
committed
fix: Replace instances of Path(".") with Path("") to avoid adding . in path string
1 parent f0a0b9b commit 342b01d

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kotlin.code.style=official
22
group=com.mineinabyss
3-
version=3.2.0-alpha.2
3+
version=3.2.0-alpha.3
44
idofrontVersion=0.25.6

keepup-api/src/main/kotlin/com/mineinabyss/keepup/api/KeepupConfigSync.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ class KeepupConfigSync(
5858
val isTemplate = templateCacheDir != null && source.name.endsWith(".peb")
5959
val destAbsolute =
6060
if (isTemplate)
61-
destRoot / (dest.parent ?: Path(".")) / dest.name.removeSuffix(".peb")
61+
destRoot / (dest.parent ?: Path("")) / dest.name.removeSuffix(".peb")
6262
else destRoot / dest
6363

6464
val sourceForSkipComparison = if (isTemplate) {
65-
val cacheFile = templateCacheDir!! /
66-
(dest.parent ?: Path(".")) /
65+
val cacheFile = templateCacheDir /
66+
(dest.parent ?: Path("")) /
6767
"${hashString(reduced.variables.toString() + "len: ${source.fileSize()}").toHexString()}-${dest.name}"
6868

6969
// Create template cache if necessary

keepup-api/src/main/kotlin/com/mineinabyss/keepup/config_sync/Inventory.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ data class FileConfig(
5656
@KeepGeneratedSerializer
5757
data class CopyPath(
5858
/** Offset from target path to copy to (i.e. target / dest / *files in source*). */
59-
val dest: String = ".",
59+
val dest: String = "",
6060
val source: String,
6161
) {
6262
object InlineSeriailzer : KSerializer<CopyPath> {
@@ -71,6 +71,8 @@ data class CopyPath(
7171
else generatedSerializer()
7272
}
7373
}
74+
75+
override fun toString() = "$source -> $dest"
7476
}
7577

7678
@Serializable

0 commit comments

Comments
 (0)