Skip to content

Commit 9fef6f7

Browse files
authored
Merge pull request #50 from oblivioncth/dev
Merge to master for v0.7.5.2
2 parents e90f475 + ebb7c9b commit 9fef6f7

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24.0...3.26.0)
66
# Project
77
# NOTE: DON'T USE TRAILING ZEROS IN VERSIONS
88
project(FIL
9-
VERSION 0.7.5.1
9+
VERSION 0.7.5.2
1010
LANGUAGES CXX
1111
DESCRIPTION "Flashpoint Importer for Launchers"
1212
)

app/src/frontend/launchbox/lb-install.cpp

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,26 @@ QString Install::translateDocName(const QString& originalName, Fe::DataDoc::Type
306306
{
307307
Q_UNUSED(type);
308308

309-
// Perform general kosherization
310-
QString translatedName = Qx::kosherizeFileName(originalName);
311-
312-
// LB specific changes
309+
/* LB has started doing something strange and annoying...
310+
* It appears it might be that it tries to override the filename of playlists with the
311+
* internal name (i.e. <Name> within the file), and then applies its own substitution
312+
* rules to deal with illegal characters. As such, here we try to do what LB does to avoid
313+
* unintended filename changes after an import (since that will lead to mismatches for
314+
* icons and futurer imports).
315+
*
316+
* The replacements needed, and the order of them, will need to be determined on a case-by-case
317+
* basis as they come up.
318+
*/
319+
320+
QString translatedName = originalName;
321+
322+
// LB matched changes (LB might replace all illegal characters with underscores, but these are is known for sure)
323+
translatedName.replace(':','_');
313324
translatedName.replace('#','_');
314325
translatedName.replace('\'','_');
315-
translatedName.replace('-','_');
326+
327+
// General kosherization
328+
translatedName = Qx::kosherizeFileName(translatedName);
316329

317330
return translatedName;
318331
}

0 commit comments

Comments
 (0)