Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-33907

Android: androiddeployqt uses directory as an executable

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.2.0
    • 5.2.0 Alpha
    • Build tools: Other
    • None
    • Linux Mint Debian Edition 64-bit

    • Android
    • 33d90d97d936d0e32ffe0a07b3a7809f67e0e70c

    Description

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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mlubinski Michał Łubiński
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes