From dd8635d9b342758039579d98c6c5f43f691de216 Mon Sep 17 00:00:00 2001 From: Peter Taylor Date: Sat, 17 Aug 2019 09:06:07 +0000 Subject: [PATCH] Also rescan on touch --- adbfs.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/adbfs.cpp b/adbfs.cpp index fb3d37d..32e469c 100644 --- a/adbfs.cpp +++ b/adbfs.cpp @@ -777,16 +777,10 @@ static int adb_access(const char *path, int mask) { static int adb_utimens(const char *path, const struct timespec ts[2]) { string path_string; - string local_path_string; path_string.assign(path); fileData[path_string].timestamp = fileData[path_string].timestamp + 50; - local_path_string = tempDirPath; - string_replacer(path_string,"/","-"); - local_path_string.append(path_string); - path_string.assign(path); shell_escape_path(path_string); - shell_escape_path(local_path_string); queue output; string command = "touch '"; @@ -795,6 +789,9 @@ static int adb_utimens(const char *path, const struct timespec ts[2]) { cout << command<<"\n"; adb_shell(command); + // If we forgot to mount -o rescan then we can remount and touch to trigger the scan. + if (adbfs_conf.rescan) adb_rescan_file(path_string); + return 0; }