Skip to content
  • Wolfgang Bauer's avatar
    Fix destDir handling in KGet::addTransfer() · ed694ff5
    Wolfgang Bauer authored
    destDir is supposed to be a local path, so treat it as such and use
    QUrl::fromLocalFile() to convert it to QUrl.
    And use QUrl::path() to get the directory as QString, QUrl::toString()
    returns an Url including "file://".
    
    Also, adjust KGet::redownloadTransfer() this change, it should actually
    pass a path as destDir (without "file://"), and avoid an unnecessary
    QUrl->QString->QUrl conversion for the src whilst at it.
    
    This fixes spurious "Directory is not writable" errors when trying to
    add a download via the clipboard "Auto-Paste" feature or DBUS.
    
    BUG: 390612
    FIXED-IN: 17.12.3
    ed694ff5