Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:ARM
fritzing
fritzing-folderutils-fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fritzing-folderutils-fix.patch of Package fritzing
From a31df40b54435500a9806f8f1aa90a98131cb788 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann <bugs@vdm-design.de> Date: Sat, 4 Feb 2017 10:05:05 +0100 Subject: [PATCH] folderutils.cpp: Fix getAppPartsSubFolder2 returns current working directory if fritzing-parts folder is not found getApplicationSubFolder returns QDir() if the directory can not be found, but QDir() returns the current working directory, which nearly always exists and probably is the wrong path. As getAppPartsSubFolder2 only checks for existence of that directory we end up with the wrong directory if parts folder is used instead for fritzing-parts. Therefore check if when we ask for fritzing-parts folder we really get a folder with that name. --- src/utils/folderutils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/folderutils.cpp b/src/utils/folderutils.cpp index 96f10c7..3dfd966 100644 --- a/src/utils/folderutils.cpp +++ b/src/utils/folderutils.cpp @@ -121,12 +121,12 @@ QDir FolderUtils::getAppPartsSubFolder(QString search) { QDir FolderUtils::getAppPartsSubFolder2(QString search) { if (m_partsPath.isEmpty()) { QDir dir = getApplicationSubFolder("fritzing-parts"); - if (dir.exists()) { + if (dir.exists() && dir.dirName().endsWith("fritzing-parts")) { m_partsPath = dir.absolutePath(); } else { QDir dir = getApplicationSubFolder("parts"); - if (dir.exists()) { + if (dir.exists() && dir.dirName().endsWith("parts")) { m_partsPath = dir.absolutePath(); } } -- 2.10.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor