juk3n/fluffypublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/juk3n/fluffy.git
git clone ssh://git@rickub.com/juk3n/fluffy.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

added empty path validation #45

Merged@github-juk3n wants to merge 44-warning-when-no-game-found-after-play into main
Merged as 21b17375d3a2.
1 file changed
modified app/src/fluffyApplication.cpp +6 -1
@@ -4,7 +4,12 @@
44
55 auto FluffyApplication::runGame(std::string gameName) -> void {
66 std::string pathToRun = gameRepository->getGameByName(gameName).getPath();
7- system(pathToRun.c_str());
7+ if(pathToRun.empty()) {
8+ std::cout << "no application found" << std::endl;
9+ }
10+ else {
11+ system(pathToRun.c_str());
12+ }
813 }
914
1015 auto FluffyApplication::handleCommand(
@@ -4,7 +4,12 @@
4 4
5 auto FluffyApplication::runGame(std::string gameName) -> void {5 auto FluffyApplication::runGame(std::string gameName) -> void {
6 std::string pathToRun = gameRepository->getGameByName(gameName).getPath();6 std::string pathToRun = gameRepository->getGameByName(gameName).getPath();
7- system(pathToRun.c_str());7+ if(pathToRun.empty()) {
8+ std::cout << "no application found" << std::endl;
9+ }
10+ else {
11+ system(pathToRun.c_str());
12+ }
8 }13 }
9 14
10 auto FluffyApplication::handleCommand(15 auto FluffyApplication::handleCommand(