Skip to content

fix: copy-paste in same folder fails with 'Source and destination must not be the same' #5138

Closed

Description

@rkristelijn

Problem

When copying a file in the sidebar and pasting in the same folder, MarkText shows:

Source and destination must not be the same.

This is incorrect for copy operations. Only cut should be blocked when src == dest.

Expected Behavior

Copy-paste in the same folder should create a duplicate with a suffix, e.g.:

  • file.md → file (copy).md
  • If that exists: file (copy 2).md, etc.

This matches the behavior of every file manager (Nautilus, Finder, Explorer).

Environment

  • Linux Mint 22.3
  • MarkText develop branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions