Skip to content

[linux] simulator missing '\r' for windows newline #2

Description

@WillForan

In rds_raid.cpp's rdsRaid::parseOutputDirectory I added a printf to debug like

                    temp=raidLine.right(22);
                    raidLine.chop(22);
                    removePrecedingSpace(temp);
                    raidEntry.creationTime=QDateTime::fromString(temp,"dd.MM.yyyy HH:mm:ss");
                    printf("Added creation time '%s' => '%s'\n", temp.toStdString().c_str(), raidEntry.creationTime.toString("yyyy-MM-dd").toStdString().c_str());

It shows

Added creation time '0   15.06.2026 14:49:1' => ''

I think it's off by one because the simulator's mode=1 has printf("\n") instead of "\r\n" which is expected by parseOutputDirectory's raidLine.chop(2).

It's not a problem on windows because the compiler automatically inserts the CR?

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