Skip to content

Commit 4c96976

Browse files
committed
🐛 fix empty dir issue
1 parent 195d339 commit 4c96976

File tree

2 files changed

+5
-1
lines changed
  • corvette/src/main/kotlin/com/github/theapache64/corvetee
  • src/main/kotlin/com/theapache64/createcomposeapp

2 files changed

+5
-1
lines changed

corvette/src/main/kotlin/com/github/theapache64/corvetee/Corvette.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ class Corvette(
115115
}
116116
targetSrcPath.createDirectories()
117117
myAppSrcPath.moveTo(targetSrcPath, overwrite = true)
118+
val srcParent = myAppSrcPath.parent.toFile()
119+
if (srcParent.listFiles()?.isEmpty() == true) {
120+
srcParent.deleteRecursively()
121+
}
118122
}
119123
}
120124
}

src/main/kotlin/com/theapache64/createcomposeapp/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.github.theapache64.corvetee.util.println
77
import kotlin.io.path.Path
88
import kotlin.io.path.div
99

10-
private const val IS_DEBUG = false
10+
private const val IS_DEBUG = true
1111

1212
enum class Platform(val title: String) {
1313
Android("Android"),

0 commit comments

Comments
 (0)