1. 19 May, 2020 2 commits
  2. 15 May, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 139cc496
      Harald Sitter authored
    • Harald Sitter's avatar
      sftp: map sftp_open error to kio error · 07e44cb1
      Harald Sitter authored
      sftp gives out more relevant errors such as SSH_FX_PERMISSION_DENIED,
      let's forward them as KIO errors instead of using the general cannot open
      Test Plan: hoping for the best! bad permissions on the remote now actually raise suitable kio errors, functionally that seems to make little difference unfortunately
      Reviewers: feverfew
      Reviewed By: feverfew
      Subscribers: kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D29743
  3. 14 May, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 10cf68d9
      Harald Sitter authored
      # Conflicts:
      #	CMakeLists.txt
    • Harald Sitter's avatar
      sftp: break large writes into multiple requests · 1df61748
      Harald Sitter authored
      servers have arbitrary limits that we should stay below. to ensure this
      happens use MAX_XFER_BUF_SIZE as maximum size per request. if we read
      data large than that, break it apart into multiple requests
      (I am mostly guessing here, the rfc doesn't seem to impose any size
       constraint on the write requests themselves, so probably packet
       constraints apply by default)
      BUG: 404890
      FIXED-IN: 20.04.2
      Test Plan:
      - fallocate -l 128M file
      - sftp to localhost
      - copy file from one dir to another
      - compare checksums match
      - open xls file (via kio-fuse)
      - change
      - save
      - close
      - open again
      - changes are still there
      Reviewers: ngraham, meven, feverfew
      Reviewed By: ngraham, meven, feverfew
      Subscribers: meven, feverfew, kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D29634
  4. 11 May, 2020 1 commit
  5. 09 May, 2020 3 commits
  6. 06 May, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · a14da6cf
      Harald Sitter authored
    • Harald Sitter's avatar
      smb: resolve potential dnssd names via kdnssd · a042130e
      Harald Sitter authored
      as it turns out this is vastly more efficient for our purposes. we already
      know that this address should only be a dnssd address, so we can ask our
      dnssd daemon directly instead of taking on the entire weight of qhostinfo
      and proper DNS resolution.
      asking avahi directly reduces successful resolution time down from ~4 s
      to ~4 ms (yes, ms!). on resolution failure the timing remains about
      the same it seems
  7. 04 May, 2020 1 commit
    • Méven Car's avatar
      filenamesearch: Implement stat to display metainfo · 951e2f2d
      Méven Car authored
      filenamesearch ioslave needed a stat implementation to be rendered properly in dolphin information panel.
      BUG: 420354
      FIXED-IN: 20.08
      Test Plan: Open filenamsearch:/ in dolphin and search something
      Reviewers: #dolphin, #frameworks, ngraham, elvisangelaccio
      Reviewed By: #dolphin, elvisangelaccio
      Subscribers: kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D29197
  8. 29 Apr, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 7c7590a2
      Harald Sitter authored
    • Harald Sitter's avatar
      sftp: successfully write files to proftpd servers · effb511c
      Harald Sitter authored
      proftpd doesn't like zero size writes and returns with an error leading us
      to assume that the write failed, when in fact it was fine eitherway because
      we didn't write anything one way or the other.
      so, instead just break out of the loop early. there's nothing lost by
      us not doing that final EOF write since we don't need it from a protocol
      the break occurs just before writing because preceding it is "spin-up" tech
      opening the file and so forth. we need to have that run even when putting
      a 0b file.
      this successfully writes 0B, 1B, and 128M files both with partial markers
      enabled and disabled to proftpd 1.3.6c
      BUG: 419999
      FIXED-IN: 20.04.1
  9. 27 Apr, 2020 4 commits
    • Harald Sitter's avatar
      smb: refine internal error string · afc32611
      Harald Sitter authored
      in master we can break the string so it's slightly less rubbish. give it
      context for the arguments. throw out the reference to stat since
      this may occur from a number of calls. flatten the nested composition of
      errno + strerr
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 935e8f6a
      Harald Sitter authored
    • Harald Sitter's avatar
      smb: put unmapped errno value into error message · 457ee4d5
      Harald Sitter authored
      otherwise it's annoyingly hard to figure out which error isn't mapped.
      this is done through a nested composition so as to not disturb the
      localized string in 20.04
    • Harald Sitter's avatar
      smb: accurately attempt to resolve the correct WSD host · a4aefbbd
      Harald Sitter authored
      this previously was the wrong variable. m_current_url is only set after
      url checking while kurl would be the current url under check. this lead
      to state confusion was implicit stat() calls from dolphin on host foo would
      evaluate the previous host (e.g. bar) for the wsd suffix. this meant we'll
      let a foo with suffix pass through the check, and that just mustn't ever
      BUG: 420578
      FIXED-IN: 20.04.1
  10. 24 Apr, 2020 1 commit
  11. 17 Apr, 2020 1 commit
    • Harald Sitter's avatar
      smb: put a bandaid on a dangling warning I left behind · 12e03aa5
      Harald Sitter authored
      many slaves seem to do this (process bytes, then say the processed size
      is the stat'd size when in fact it may not be). I'll believe it's not a
      huge concern because of that, but even so there should be some indication
      if that expectation fails. a warning should suffice
  12. 15 Apr, 2020 1 commit
  13. 14 Apr, 2020 4 commits
  14. 13 Apr, 2020 1 commit
    • Alexander Saoutkin's avatar
      [KIO-MTP] Fix null pointer dereference · 94e7b643
      Alexander Saoutkin authored
      A null pointer can be returned from getDevice() if a device is disconnected.
      Passing NULL into LIBMTP_Get_Storage() results in a NULL pointer dereference.
      BUG: 405838
      Test Plan:
      Compiles. I couldn't reproduce this as described in the bug report, but from
      reading the attached stacktrace in the bug report it's obvious what went wrong
      Reviewers: akrutzler, dfaure, elvisangelaccio
      Reviewed By: elvisangelaccio
      Subscribers: anthonyfieroni, kde-frameworks-devel, fvogt, kfm-devel, ngraham
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D28535
  15. 11 Apr, 2020 1 commit
    • Alexander Kandaurov's avatar
      activities: Close the database connection to prevent file descriptor leak · 8c3c27da
      Alexander Kandaurov authored
      Summary: The connection to the database doesn't get closed, which leads to a leakage of file descriptors to kactivities database files, eventually reaching the open file limit. Also, sometimes warnings about duplicate connections may appear in the console. This patch fixes this by closing and removing the connection.
      Test Plan:
        # Right-click a file in Dolphin and hover the Activities menu. Do it several times.
        # Check the output of
      ls -l /proc/`pidof dolphin`/fd
      for open descriptors to ~/.local/share/kactivitymanagerd/resources/database{,-wal}.
      Reviewers: ivan, meven
      Reviewed By: meven
      Subscribers: meven, kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D28739
  16. 09 Apr, 2020 2 commits
  17. 07 Apr, 2020 2 commits
    • Alexander Saoutkin's avatar
      Fix lifetime of slot in KIO-MTP · f4e0183a
      Alexander Saoutkin authored
      This slot was incorrectly made to last the lifetime of the slave. In fact, this
      slot should only be live for the lifetime of the event loop (one I/O operation).
      This can cause issues with the data being emitted for data from other IO
      operations. By making it live in the lifetime of the local event loop this
      scenario cannot occur as LIBMTP only allows one operation at a time.
      Test Plan:
      Via the use of KIOFuse (as this is where the bug was noticed).
      Before: Opening a file for the first time worked. Subsequent opens would fail
      due to garbage output After: Opening any number of files at any time works.
      Reviewers: akrutzler, dfaure, elvisangelaccio
      Subscribers: kde-frameworks-devel, kfm-devel, fvogt
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D28520
    • Harald Sitter's avatar
      smb: make all qmin and qmax explicitly typed off_t · f4da469b
      Harald Sitter authored
      also explicitly set the min/max constexprs to off_t explicitly.
      this should now make all related calls act exclusively on concretely typed
      off_ts and as a result build on all platforms with all compilers 🤞
      BUG: 419702
  18. 06 Apr, 2020 6 commits
    • Harald Sitter's avatar
      smb: remove cast again, specify type instead · 143287d5
      Harald Sitter authored
      easier on the eyes. thanks to Pino for the suggestion!
    • Harald Sitter's avatar
      smb: make sure we use balanced arguments on qmax · 95a5ed31
      Harald Sitter authored
      previously there was opportunity for failure here when the deduced literal
      type was different from the actual off_t type and qmax is very picky
      about explicit input types. so, instead cast to off_t, as any int will
      accommodate 0 anyway so the cast has no downsides.
      BUG: 419702
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 47d1b272
      Harald Sitter authored
    • Harald Sitter's avatar
      smb: add hack to support spaces in workgroup names · f40191a1
      Harald Sitter authored
      workgroup names are as best I can tell always still netbios names which
      means they can contain a bunch of characters ordinarily not found in valid
      host names. e.g. spaces
      this causes trouble with the IANA SMB URI draft, as used by libsmbc,
      since the workgroup would be the host field of the RI when browsing
      a workgroup (i.e. filtering hosts that are member of a given workgroup)
      because QUrl does not allow invalid hostnames in the host field.
      to bypass this problem we now put the workgroup name into the query of the
      url as `kio-workgroup`, should it cause trouble in the host field. SMBUrl
      takes this query into account when constructing the url for smbc.
      since the latter has uniquely exciting potential for breakage this entire
      dance is only done when absolutely necessary and otherwise we continue with
      all the same code and behavior as without this commit.
      on a side note: the awkward name flexibility seems to not extend to
      computer names anymore (supposedly because of LLMNR) so this entire
      use case is already very niche as we (and libsmbclient) currently only
      support workgroup browsing for NT1 networks, and NT1 is by default not
      supported on windows10 or samba.
      FIXED-IN: 20.04
      BUG: 204423
      Test Plan: builds, test passes, can browse workgroup with space in name
      Reviewers: ngraham
      Subscribers: kde-frameworks-devel, kfm-devel, thiago
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D27804
    • Harald Sitter's avatar
      smb: use prettyname.kio-discovery-wsd for hostname of wsdiscoveries · daec307b
      Harald Sitter authored
      previously we simply used the ip address. this is fairly awkward though.
      instead try to deduce a resolvable host name from the pretty name.
      at discovery time we now mark wsdiscovieres for special handling
      at listDir time we then attempt to resolve the name.local and if that
      fails strip the .local to get the presumed LLMNR/netbios name. this means
      the (first) listDir may be slower while we try to find a working hostname
      but discovery is still as fast as possible.
      Test Plan: wsdd on linux server resolves as expected, wsd on win10 also resolves as expected
      Reviewers: ngraham, meven
      Reviewed By: ngraham, meven
      Subscribers: kossebau, kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D28513
    • Harald Sitter's avatar
      import license copies via reuse · a2a8facc
      Harald Sitter authored
      for new code in smb source tree
  19. 05 Apr, 2020 1 commit
  20. 04 Apr, 2020 1 commit
    • David Edmundson's avatar
      Add 3mf thumbnail support · a5ded8f0
      David Edmundson authored
      3D Modelling Format is based on "Open Packaging Conventions" which is
      already supported by the opendocumentthumbnail spec, we just need to add
      the relevant mime type so our thumbnailer gets used.
      CCBUG: 407431
      Test Plan:
      Registed mime type from glob.
      (I should submit this to fd-shared-mime spec)
      Opened dolphin with a 3mf file with a thumbnail.
      It "just worked"
      Reviewers: broulik
      Reviewed By: broulik
      Subscribers: kde-frameworks-devel, kfm-devel
      Tags: #dolphin, #frameworks
      Differential Revision: https://phabricator.kde.org/D28570