Skip to content

Commit

Permalink
Also rescan on touch
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Taylor committed Aug 17, 2019
1 parent 17365c9 commit dd8635d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions adbfs.cpp
Expand Up @@ -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<string> output;
string command = "touch '";
Expand All @@ -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;
}

Expand Down

0 comments on commit dd8635d

Please sign in to comment.