Skip to content

Trailing slashes can break relative paths #4173

@tresf

Description

@tresf

This may be a long standing bug, but there's something in LMMS that appears to put additional trailing slashes in working paths.

e.g.

C:/samples/

vs.

c:/samples///

Although I'm not sure the exact cause of this, it's a benign problem when loading samples. The issue seems to come into play when saving because the relative path logic is broken.

To reproduce, add an extra slash or two to the LMMS WORKING DIRECTORY in the preferences pane and restart LMMS.

screen shot 2018-02-13 at 1 07 00 pm

Next, import some samples into the project from your LMMS WORKING DIRECTORY PATH and save the project to an .mmp format. When the files are saved, instead of being relatively, they contain the full paths.

Expected:

<audiofileprocessor ... src="mysample.ogg" />

Actual:

<audiofileprocessor ... src="/home/tres/lmms/samples/mysample.ogg" />

The underlying bug may actually be something with the preferences dialog, but we need to fix the trailing spaces bug as well incase this is typed by a user on accident.

Disclaimer, this bug was introduced using the Sample Track, not audiofileprocessor. Example above is hypothetical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions