diff options
author | Alessandro Portale <[email protected]> | 2023-03-24 14:28:16 +0100 |
---|---|---|
committer | Alessandro Portale <[email protected]> | 2023-03-24 13:50:14 +0000 |
commit | f7639f458a4b87263e96de70f26554a660148bc3 (patch) | |
tree | 933e9ea99b304460fc88eb3139d80bcad4e06314 /src/plugins/android/androiddevice.cpp | |
parent | 01b210869729d7aef12c97be38f99805889ea6d9 (diff) |
Android: Launch "adb track-devices" with explicit working directory
Since no working directory was explicitly set, the "bin/" directory of
QtC was chosen as working directory.
"adb track-devices" leaves the server process alive after terminating,
and that server process used QtC's working directory. On Windows, that
caused that directory to be undeletable/unmovable as long as the adb
server was alive.
This change sets the working directory of "adb track-devices" to the
parent dir of the adb binary.
Task-number: QTCREATORBUG-28932
Change-Id: I3adf52829c9f4bf456d05d2685c04314e1d25a40
Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/plugins/android/androiddevice.cpp')
-rw-r--r-- | src/plugins/android/androiddevice.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp index 252e4ee1fba..4c034c30af1 100644 --- a/src/plugins/android/androiddevice.cpp +++ b/src/plugins/android/androiddevice.cpp @@ -645,6 +645,7 @@ void AndroidDeviceManager::setupDevicesWatcher() const CommandLine command = CommandLine(m_androidConfig.adbToolPath(), {"track-devices"}); m_adbDeviceWatcherProcess->setCommand(command); + m_adbDeviceWatcherProcess->setWorkingDirectory(command.executable().parentDir()); m_adbDeviceWatcherProcess->setEnvironment(AndroidConfigurations::toolsEnvironment(m_androidConfig)); m_adbDeviceWatcherProcess->start(); |