Seamly on linux creates always folders

Hi,

Every start of Seamly2D create a fordert seamly2d in my howdirectory /homes/user/seamly2d/… even though I configured other forder locations.

Would it be possible to first check if the folder from the preferences exists, before creating the fallback folders.

2 Likes

What files are in the folder? Sounds like this is the QDir::homePath()… possibly the path specified by the HOME environment variable.

If you load a pattern or measurements file for ex: does it look in the paths set in the preferences?

Unless it’s causing an issue not sure it matters if there is an empty seamly2d folder created.

2 Likes

Hi Douglas,

only the folders are created. When opening documents in Seamly2D or creating new ones and saving them, the app looks in the folder as per my preferences.

The empty folders are not causing problems. It’s just that I manage my files differently and have to deal with folders I don’t want there…

2 Likes

In other words in the “home” dir (in Windows it’s the users’s folder) you are getting these folders created - with the folder names translated if using a language other than English?

Where these come from is when the application starts:

which for ex: the default patten folder is:

image

Then in normal use the app would call this when loading a pattern:

Which basically says… get the pattern folder from the settings. If there is no existing folder by that name - create it.

SO… the solution here is rather than calling for example:

QDir().mkpath(settings->getDefaultPatternPath());

we call:

QDir().mkpath(settings->getPatternPath());

Repeat for all the other folders.

That way when the app starts it will try to get the pattern folder from the settings… if the folder doesn’t exist it will then create the “default” folder in the user’s HOME folder.

Don’t feel bad… my seamly2d folder had a set of subfolders for every other language because I’m always testing the app with different languages.

BTW… I don’t classify this as a bug, but rather unexpected behavior.

3 Likes