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; }