-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.2.0 Alpha
-
None
-
Linux Mint Debian Edition 64-bit
-
-
33d90d97d936d0e32ffe0a07b3a7809f67e0e70c
Use case:
Environment
mlubinski@milo-lmde ~ $ echo $PATH /home/Tools/jdk1.6.0_45/bin:/home/android/android-sdk-linux/tools:/home/android/android-sdk-linux/platform-tools:/home/android/android-ndk-r8e:/usr/bin:/home/Tools/jdk1.6.0_45/bin:/home/android/android-sdk-linux/tools:/home/android/android-sdk-linux/platform-tools:/home/android/android-ndk-r8e:/home/mlubinski/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games mlubinski@milo-lmde ~ $ which ant /usr/bin/ant
QString findInPath(const QString &fileName) method from androiddeployqt searches for the ant binary. While checking /home/android/android-sdk-linux/tools path it finds /home/android/android-sdk-linux/tools/ant directory because
if (QFile::exists(path + QLatin1Char('/') + fileName))
is true. It causes an error:
Using ant: /home/android/android-sdk-linux/tools/ant sh: 1: /home/android/android-sdk-linux/tools/ant: Permission denied
Using QFileInfo should be safer:
foreach (QString path, paths) {
if ( QFileInfo(path + QLatin1Char('/') + fileName).isFile() )
return path + QLatin1Char('/') + fileName;
}
| For Gerrit Dashboard: QTBUG-33907 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 67415,1 | androiddeployqt: Don't detect directories as executable files | stable | qt/qttools | Status: MERGED | +2 | 0 |