Skip to content

[Bug]: CKAN copies files infinitely if clone target folder is subdirectory of source folder #4520

@nekename

Description

@nekename

Is there an existing issue for this?

  • I have checked the existing issues for an existing issue. I even actually looked at the ones that are pinned to the top!

Operating System

Linux

CKAN Version

v1.36.0

Games

KSP 1

Game Version

v1.24.5 or something

Did you make any manual changes to your game folder (i.e., not via CKAN)?

No response

Describe the bug

I tried to clone my default instance, Kerbal Space Program, to a new instance called RP1, and thought I would fit the new instance into a subdirectory of the original instance folder. It was taking a while so I left it and forgot about it, and lo and behold, I have 600 gigabytes of RP1 instance, due to CKAN repeatedly copying the files it copied into RP1 into itself.

CKAN should either detect when to not copy recursively, using some standard operating system copy tool that doesn't do this, or throw an error if the canonicalised path of the target folder is a subdirectory of the canonicalised path of the source directory.

Image Image

Steps to reproduce

Clone an instance and set the target directory to a subdirectory of the original

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working as intendedCore (ckan.dll)Issues affecting the core part of CKAN

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions