Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only push directory if we find a MO INI file #1965

Merged
merged 1 commit into from
Jun 8, 2024
Merged

Only push directory if we find a MO INI file #1965

merged 1 commit into from
Jun 8, 2024

Conversation

ashemedai
Copy link
Contributor

@ashemedai ashemedai commented Jan 1, 2024

Only push directory if we find a MO INI file.


Open points:

  • I figured having a debug log here would be useful in troubleshooting
  • I could not find any OS-independent way of joining paths via Qt, do we have something like this that I should be using instead of the hardcoded path joining (taken from the same file)
  • Do we still want the filter code if this lands?
  • I did a compare against case-sensitive ModOrganizer.ini, can this possibly cause issues that warrants needing a full path lowercase comparison?

@Holt59
Copy link
Member

Holt59 commented Jan 2, 2024

You can probably remove the filter parts if we're checking for the INI file. You can use the following to check for the existing of the INI if you don't want to use a hard-coded /:

const QFileInfo iniFile(QDir(d), "ModOrganizer.ini");

if (iniFile.exists()) {

}

@ashemedai
Copy link
Contributor Author

Done, removed the filter setup.
Had to expand d first, as it was only a path component based on the game's name.

@Holt59 Holt59 merged commit 3d18f0c into ModOrganizer2:master Jun 8, 2024
2 checks passed
@ashemedai ashemedai deleted the instance_check_for_ini branch June 8, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants