Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ private fun resolveFullPath(rawPath: String): String? = memScoped {
val requiredLength = GetFullPathNameW(rawPath, MAX_PATH.toUInt(), initialBuffer, null)

when {
requiredLength == 0u -> null
requiredLength < MAX_PATH.toUInt() -> initialBuffer.toKStringFromUtf16()
requiredLength == 0u -> {
null
}

requiredLength < MAX_PATH.toUInt() -> {
initialBuffer.toKStringFromUtf16()
}

else -> {
val fullBuffer = allocArray<UShortVar>(requiredLength.toInt())
val resolvedLength = GetFullPathNameW(rawPath, requiredLength, fullBuffer, null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import platform.windows.ShellExecuteW
// Opaque pointer type for COM objects (cinterop doesn't export C++ interfaces)
private typealias ComPtr = CPointer<ByteVar>
private typealias ComPtrVar = CPointerVar<ByteVar>

private const val S_FALSE_HRESULT = 1
private val ERROR_CANCELLED_HRESULT = 0x800704C7u.toInt()
private val ERROR_FILE_NOT_FOUND_HRESULT = 0x80070002u.toInt()
Expand Down Expand Up @@ -208,7 +209,9 @@ private fun showSaveDialog(
extension?.let {
val setDefaultExtensionHr = fk_dialog_set_default_extension(dlg.reinterpret(), it)
if (setDefaultExtensionHr != S_OK) {
throw IllegalStateException("IFileDialog::SetDefaultExtension failed with HRESULT 0x${setDefaultExtensionHr.toUInt().toString(16)}")
throw IllegalStateException(
"IFileDialog::SetDefaultExtension failed with HRESULT 0x${setDefaultExtensionHr.toUInt().toString(16)}",
)
}
setFileTypes(dlg, setOf(it))
}
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
agp = "9.1.0"
agp = "9.1.1"
android-compileSdk = "36"
android-minSdk = "23"
android-targetSdk = "36"
androidx-activity = "1.13.0"
androidx-annotation = "1.9.1"
androidx-annotation = "1.10.0"
androidx-documentfile = "1.1.0"
androidx-exifinterface = "1.4.2"
androidx-lifecycle = "2.10.0"
Expand All @@ -17,7 +17,7 @@ compose-multiplatform-material3 = "1.10.0-alpha05"
dbus-java = "5.2.0"
jna = "5.18.1"
kotlin = "2.3.20"
kotlinx-serialization = "1.10.0"
kotlinx-serialization = "1.11.0"
kotlinx-browser = "0.5.0"
kotlinx-coroutines = "1.10.2"
kotlinx-datetime = "0.7.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading