Skip to content

fix: rclone bisync --create-empty-src-dirs flag not available in older versions #472

@phernandez

Description

@phernandez

Problem

Users running older versions of rclone (e.g., v1.60.1) get an error when running bisync commands:

2025/12/20 16:31:13 Fatal error: unknown flag: --create-empty-src-dirs

The --create-empty-src-dirs flag was added to rclone bisync after v1.60. Users on Linux distributions with older package managers may have older rclone versions installed.

Reported via Discord by Nate (running Raspberry Pi with rclone v1.60.1-DEV).

Solution

Detect rclone version at runtime and only include the --create-empty-src-dirs flag if the installed version supports it (v1.64+).

def get_rclone_version() -> tuple[int, int, int] | None:
    """Get rclone version as (major, minor, patch) tuple."""
    try:
        result = subprocess.run(["rclone", "version"], capture_output=True, text=True)
        match = re.search(r'v(\d+)\.(\d+)\.(\d+)', result.stdout)
        if match:
            return int(match.group(1)), int(match.group(2)), int(match.group(3))
    except Exception:
        pass
    return None

Impact

  • Users with older rclone: bisync works, but empty directories won't be propagated (minor inconvenience)
  • Users with newer rclone: full functionality including empty directory propagation

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcloudBasic Memory Cloud

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions