From 2a8d2271a5f01516246b1a6a25dc64eacb5ecd57 Mon Sep 17 00:00:00 2001 From: kaicherry Date: Thu, 15 Jul 2021 03:12:39 -0700 Subject: [PATCH] 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. --- menu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/menu.cpp b/menu.cpp index bb5710e..e3736c2 100644 --- a/menu.cpp +++ b/menu.cpp @@ -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) {