fix: bug available vaults written to wrong array

This commit is contained in:
2026-04-26 21:02:54 +02:00
parent 68991673c0
commit b7ca3eca14
+1 -1
View File
@@ -134,7 +134,7 @@ char **getVaultsFromDirectories(char **directoryStringArray, int directoryNumber
altDebug(" is a vault\n");
vaultsArray = realloc(vaultsArray, sizeof(vaultsArray) + sizeof(char *)); // resize vaultsArray
vaultsPerDirectoryNumber[i]++; // it will be used later to know which vaults goes into which directory
directoryStringArray[nthVault] = strdup(entryName); // we use strdup and not strcpy, because memory used with opendir and readdir will be closed.
vaultsArray[nthVault] = strdup(entryName); // we use strdup and not strcpy, because memory used with opendir and readdir will be closed.
nthVault++; // it is used immediatly to set the vault into directoryStringArray
} else {
altDebug(" is not a vault (not a dir.)\n");