SUMMARY After exporting a file with the same name in some formats for Android, the file is saved as "Name. Format(1)". After exporting a jpg file with the same name it is correctly "name(1).jpg". Exporting a kra format file with the same name resulted in the incorrect "name.kra(1)". I also tested the ora format file and it also turned out to be "name. ora(1)". I'm not sure if there are other file formats that do this as well. STEPS TO REPRODUCE 1. Create a new document. 2. Save as a kra file format. 3. Export as a kra file with the same name. OBSERVED RESULT Save the file as "Untitled.kra(1)". The position of the serial number should not be here. EXPECTED RESULT Save correctly as "Untitled(1).kra". The position of the serial number should be before the file format. SOFTWARE/OS VERSIONS Krita Version: 5.1.1 Hidpi: true Qt Version (compiled): 5.12.12 Version (loaded): 5.12.12 OS Information Build ABI: arm64-little_endian-lp64 Build CPU: arm64 CPU: arm64 Kernel Type: linux Kernel Version: 5.4.147-qgki-24799409-abT733XXU1BVH4 Pretty Productname: Android (12.0) Product Type: android Product Version: 12.0 Product Model: Samsung SM-T733 Locale Languages: zh, zh_CN, zh_CN C locale: C.UTF-8 QLocale current: en QLocale system: en QTextCodec for locale: UTF-8 OpenGL Info Vendor: "Qualcomm" Renderer: "Adreno (TM) 642L" Version: "OpenGL ES 3.2 V@0530.0 (GIT@cac6e6f805, I5187d04b75, 1637574833) (Date:11/22/21)" Shading language: "OpenGL ES GLSL ES 3.20" Requested format: QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) Current format: QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) Version: 3.2 Supports deprecated functions false is OpenGL ES: true supportsBufferMapping: true supportsBufferInvalidation: false forceDisableTextureBuffers: false Extensions: "GL_EXT_texture_cube_map_array" "GL_EXT_copy_image" "GL_KHR_debug" "GL_OES_surfaceless_context" "GL_ANDROID_extension_pack_es31a" "GL_OES_shader_multisample_interpolation" "GL_EXT_memory_object" "GL_OES_depth24" "GL_QCOM_alpha_test" "GL_OES_EGL_image" "GL_EXT_blend_func_extended" "GL_ARM_shader_framebuffer_fetch_depth_stencil" "GL_EXT_blit_framebuffer_params" "GL_QCOM_texture_foveated_subsampled_layout" "GL_OES_EGL_image_external" "GL_AMD_compressed_ATC_texture" "GL_OES_packed_depth_stencil" "GL_EXT_sRGB_write_control" "GL_EXT_shader_io_blocks" "GL_OES_EGL_image_external_essl3" "GL_OES_texture_storage_multisample_2d_array" "GL_OES_depth_texture" "GL_EXT_robustness" "GL_EXT_texture_border_clamp" "GL_QCOM_texture_foveated" "GL_EXT_EGL_image_storage" "GL_OES_texture_float" "GL_EXT_texture_format_sRGB_override" "GL_OES_vertex_half_float" "GL_OES_element_index_uint" "GL_OES_depth_texture_cube_map" "GL_QCOM_shader_framebuffer_fetch_rate" "GL_EXT_EGL_image_array" "GL_OES_texture_half_float_linear" "GL_QCOM_motion_estimation" "" "GL_OES_compressed_ETC1_RGB8_texture" "GL_EXT_texture_sRGB_decode" "GL_OVR_multiview2" "GL_OES_sample_shading" "GL_EXT_texture_buffer" "GL_EXT_clip_cull_distance" "GL_EXT_discard_framebuffer" "GL_EXT_YUV_target" "GL_OES_get_program_binary" "GL_EXT_debug_label" "GL_EXT_texture_sRGB_R8" "GL_EXT_shader_non_constant_global_initializers" "GL_OVR_multiview_multisampled_render_to_texture" "GL_EXT_draw_buffers_indexed" "GL_KHR_texture_compression_astc_hdr" "GL_EXT_gpu_shader5" "GL_KHR_blend_equation_advanced_coherent" "GL_OES_texture_view" "GL_OES_EGL_sync" "GL_OES_texture_stencil8" "GL_KHR_blend_equation_advanced" "GL_EXT_shader_framebuffer_fetch" "GL_QCOM_shader_framebuffer_fetch_noncoherent" "GL_OES_vertex_array_object" "GL_EXT_texture_format_BGRA8888" "GL_EXT_EGL_image_external_wrap_modes" "GL_EXT_buffer_storage" "GL_OES_sample_variables" "GL_EXT_color_buffer_float" "GL_OES_shader_image_atomic" "GL_EXT_geometry_shader" "GL_EXT_debug_marker" "GL_KHR_no_error" "GL_EXT_protected_textures" "GL_EXT_clip_control" "GL_OES_framebuffer_object" "GL_OES_standard_derivatives" "GL_NV_shader_noperspective_interpolation" "GL_EXT_disjoint_timer_query" "GL_OES_texture_compression_astc" "GL_EXT_texture_filter_anisotropic" "GL_EXT_multisampled_render_to_texture2" "GL_EXT_primitive_bounding_box" "GL_QCOM_shading_rate" "GL_EXT_read_format_bgra" "GL_OES_texture_3D" "GL_QCOM_validate_shader_binary" "GL_KHR_texture_compression_astc_ldr" "GL_EXT_color_buffer_half_float" "GL_EXT_sRGB" "GL_EXT_multisampled_render_to_texture" "GL_EXT_texture_norm16" "GL_OES_texture_npot" "GL_EXT_texture_type_2_10_10_10_REV" "GL_QCOM_tiled_rendering" "GL_EXT_memory_object_fd" "GL_OES_rgb8_rgba8" "GL_OVR_multiview" "GL_KHR_robust_buffer_access_behavior" "GL_QCOM_YUV_texture_gather" "GL_OES_texture_half_float" "GL_EXT_tessellation_shader" "GL_EXT_fragment_invocation_density" "GL_OES_texture_float_linear" "GL_EXT_external_buffer" QPA OpenGL Detection Info supportsDesktopGL: false supportsOpenGLES: true isQtPreferOpenGLES: true useBufferInvalidation (config option): false Hardware Information GPU Acceleration: auto Memory: 7370 Mb Number of Cores: 8 Swap Location: /data/data/org.krita/cache Built for: arm64+neon Base instruction set: arm64+neon Supported instruction sets: arm64+neon arm32+neon avx512bw avx512dq avx512cd avx512f fma3+avx2 avx2 fma3+avx avx fma4 fma3+sse4.2 sse4.2 sse4.1 ssse3 sse3 sse2 Current Settings Current Swap Location: /data/data/org.krita/cache Current Swap Location writable: true Undo Enabled: true Undo Stack Limit: 200 Use OpenGL: true Use OpenGL Texture Buffer: true Disable Vector Optimizations: false Disable AVX Optimizations: false Canvas State: OPENGL_NOT_TRIED Autosave Interval: 420 Use Backup Files: true Number of Backups Kept: 1 Backup File Suffix: ~ Backup Location: Same Folder as the File Backup Location writable: false Use Win8 Pointer Input: false Use RightMiddleTabletButton Workaround: false Levels of Detail Enabled: false Use Zip64: false Display Information Number of screens: 1 Screen: 0 Name: Depth: 32 Scale: 1.8756 Physical DPI130.431 Logical DPI71.9771 Physical Size: 266, 166 Position: 0, 0 Resolution in pixels: 1365x853 Manufacturer: Model: Refresh Rate: 60 --------------------- ================================================================================ SESSION: 02 Oct 2022 11:53:45 +0800. Executing /data/app/~~wF8ERnSu_xIzj6p6kMXXkg==/org.krita-cq75o0-tsNDC0zrAEi-pOw==/lib/arm64/libkrita.so Krita Version: 5.1.1, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 24793 -- -- -- -- -- -- -- -- 02 Oct 2022 11:53:45 +0800: Style: fusion. Available styles: android, Windows, Fusion 02 Oct 2022 11:53:46 +0800: Creating database from scratch (database didn't exist, new schema version: 0.0.17). 02 Oct 2022 11:54:04 +0800: Created image "未命名", 2480 * 3508 pixels, 300 dpi. Color model: 8 位整数/通道 RGB/透明度 (sRGB-elle-V2-srgbtrc.icc). Layers: 2 02 Oct 2022 11:54:08 +0800: Converting from application/x-krita to application/x-krita. Location: /storage/emulated/0/Android/data/org.krita/files/Documents/krita-backup/krita-24793-document_0-autosave.kra. Real location: /storage/emulated/0/Android/data/org.krita/files/Documents/krita-backup/krita-24793-document_0-autosave.kra. Batchmode: 0. Configuration: none 02 Oct 2022 11:54:10 +0800: Saving Document as content://com.android.externalstorage.documents/document/primary2480ADownloadapplication/x-kritaFUntitled.kra (mime: application/x-krita). 2480 * 3508 pixels, 3 layers. 101 frames, 24 framerate. Export configuration: No configuration 02 Oct 2022 11:54:10 +0800: Create a simple backup for content://com.android.externalstorage.documents/document/primary%3ADownload/storage/emulated/0/Android/data/org.krita/files/Documents/krita-backupFUntitled.kra in /storage/emulated/0/Android/data/org.krita/files/Documents/krita-backup. 02 Oct 2022 11:54:10 +0800: Converting from application/x-krita to application/x-krita. Location: content://com.android.externalstorage.documents/document/primarynoneADownloadcontent://com.android.externalstorage.documents/document/primarynoneADownload0FUntitled.kraFUntitled.kra. Real location: %4. Batchmode: %5. Configuration: %6 02 Oct 2022 11:54:11 +0800: Completed saving content://com.android.externalstorage.documents/document/primaryOKADownloadapplication/x-kritaFUntitled.kra (mime: application/x-krita). Result: OK. Warning: . Size: 234223 02 Oct 2022 11:54:11 +0800: Removing autosave file: /storage/emulated/0/Android/data/org.krita/files/Documents/krita-backup/krita-24793-document_0-autosave.kra 02 Oct 2022 11:54:11 +0800: Saving Completed 02 Oct 2022 11:54:17 +0800: Exporting Document: content://com.android.externalstorage.documents/document/primary2480ADownloadapplication/x-kritaFUntitled.kra (1) as application/x-krita. 2480 * 3508 pixels, 3 layers, 101 frames, 24 framerate. Export configuration: No configuration 02 Oct 2022 11:54:17 +0800: Create a simple backup for content://com.android.externalstorage.documents/document/primary%3ADownload/storage/emulated/0/Android/data/org.krita/files/Documents/krita-backupFUntitled.kra (1) in /storage/emulated/0/Android/data/org.krita/files/Documents/krita-backup. 02 Oct 2022 11:54:17 +0800: Converting from application/x-krita to application/x-krita. Location: content://com.android.externalstorage.documents/document/primarynoneADownloadcontent://com.android.externalstorage.documents/document/primarynoneADownload0FUntitled.kra (1)FUntitled.kra (1). Real location: %4. Batchmode: %5. Configuration: %6 02 Oct 2022 11:54:18 +0800: Completed saving content://com.android.externalstorage.documents/document/primaryOKADownloadapplication/x-kritaFUntitled.kra (1) (mime: application/x-krita). Result: OK. Warning: . Size: 234228 02 Oct 2022 11:54:18 +0800: Saving Completed ---------------------
I'm afraid, but this isn't a bug with Krita -- but the way paths are handled on Android. We have to request Android System for a location to save the file and it provides us with a filename which we can't edit. And if there is a duplicate it adds (1) to the end. The reason why it works for .jpeg, .png etc is because Android recognizes these formats and knows where to add the "(1)". But it is still Android System, we don't do any special handling to do this :)