Writes path info of menu selection (#416)

Writes to current path and "full path" of whatever in highlighted in the menu for external scripts to monitor.
This commit is contained in:
kaicherry
2021-07-15 03:12:39 -07:00
committed by GitHub
parent 6cbe7a112f
commit 2a8d2271a5

View File

@@ -4415,6 +4415,15 @@ void HandleUI(void)
if (flist_nDirEntries())
{
ScrollLongName(); // scrolls file name if longer than display line
//Write out paths infos for external integration
FILE* filePtr = fopen("/tmp/CURRENTPATH","w");
FILE* pathPtr = fopen("/tmp/FULLPATH","w");
fprintf(filePtr, "%s", flist_SelectedItem()->altname);
fprintf(pathPtr, "%s", selPath);
fclose(filePtr);
fclose(pathPtr);
if (c == KEY_HOME)
{