Skip to content

Commit c74998a

Browse files
Fix: Prevent duplicate sync markers when syncing to markdown file (#134)
* Initial plan * Fix: Use write-truncate mode when syncing to markdown file to prevent duplicate markers Co-authored-by: yogeshpaliyal <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: yogeshpaliyal <[email protected]>
1 parent a4ce52c commit c74998a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/yogeshpaliyal/deepr/sync/SyncRepositoryImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SyncRepositoryImpl(
3535
}
3636

3737
val res =
38-
context.contentResolver.openOutputStream(filePath.toUri())?.use {
38+
context.contentResolver.openOutputStream(filePath.toUri(), "wt")?.use {
3939
val count = deeprQueries.countDeepr().executeAsOne()
4040
if (count == 0L) {
4141
return@withContext RequestResult.Error(context.getString(R.string.no_data_to_export))

0 commit comments

Comments
 (0)