1. 09 May, 2020 1 commit
  2. 06 May, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · a14da6cf
      Harald Sitter authored
      a14da6cf
    • 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
      a042130e
  3. 04 May, 2020 1 commit
    • Méven Car's avatar
      filenamesearch: Implement stat to display metainfo · 951e2f2d
      Méven Car authored
      Summary:
      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
      951e2f2d
  4. 29 Apr, 2020 2 commits
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 7c7590a2
      Harald Sitter authored
      7c7590a2
    • 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
      POV.
      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
      effb511c
  5. 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
      afc32611
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 935e8f6a
      Harald Sitter authored
      935e8f6a
    • 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
      457ee4d5
    • 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
      happen.
      
      BUG: 420578
      FIXED-IN: 20.04.1
      a4aefbbd
  6. 24 Apr, 2020 1 commit
  7. 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
      12e03aa5
  8. 15 Apr, 2020 1 commit
  9. 14 Apr, 2020 4 commits
  10. 13 Apr, 2020 1 commit
    • Alexander Saoutkin's avatar
      [KIO-MTP] Fix null pointer dereference · 94e7b643
      Alexander Saoutkin authored
      Summary:
      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
      here.
      
      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
      94e7b643
  11. 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
      8c3c27da
  12. 09 Apr, 2020 2 commits
  13. 07 Apr, 2020 2 commits
    • Alexander Saoutkin's avatar
      Fix lifetime of slot in KIO-MTP · f4e0183a
      Alexander Saoutkin authored
      Summary:
      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
      f4e0183a
    • 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
      f4da469b
  14. 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!
      143287d5
    • 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
      95a5ed31
    • Harald Sitter's avatar
      Merge branch 'release/20.04' · 47d1b272
      Harald Sitter authored
      47d1b272
    • Harald Sitter's avatar
      smb: add hack to support spaces in workgroup names · f40191a1
      Harald Sitter authored
      Summary:
      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
      f40191a1
    • Harald Sitter's avatar
      smb: use prettyname.kio-discovery-wsd for hostname of wsdiscoveries · daec307b
      Harald Sitter authored
      Summary:
      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
      daec307b
    • Harald Sitter's avatar
      import license copies via reuse · a2a8facc
      Harald Sitter authored
      for new code in smb source tree
      a2a8facc
  15. 05 Apr, 2020 1 commit
  16. 04 Apr, 2020 3 commits
    • David Edmundson's avatar
      Add 3mf thumbnail support · a5ded8f0
      David Edmundson authored
      Summary:
      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
      a5ded8f0
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 6cb7e46a
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      6cb7e46a
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 2ac89be3
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      2ac89be3
  17. 03 Apr, 2020 4 commits
    • Harald Sitter's avatar
      smb: fast copy · 46b5fb42
      Harald Sitter authored
      Summary:
      see https://bugs.kde.org/show_bug.cgi?id=291835#c57 for background
      
      - reading now happens inside a future. should be safe since we don't have
        any other threads doing anything while we wait.
      - the future feeds into a buffer from which the main thread will
        take file segments and write them to disk
      - buffer has 4 segments and synchronizes the threads via wait conditions
      - the size of a segment is determined somewhat dynamically between 64kb
        and 4mb. the larger a file is the more it benefits from larger
        read requests
      
      under perfect conditions this yields approximately mount-level copy
      performance, unfortunately those are hard to hit so on average it's usually
      less (somewhere in the range of 10 to 20% depending on the actual file
      size and server type).
      
      for many tiny files performance is about where it was before. the larger
      the files get the greater the gains from this diff though.
      
      specifically here's some samples I've taken:
      
      - for downloads from windows10
        - 1G & 4G file
          - compared to 20.04 is ~77% faster
          - within 10% of windows
        - 8G file
          - compared to 20.04 is ~79% faster
          - within 5% of windows
      - uploads to windows10
        - all sizes
          - compared to 20.04 is ~50% faster
          - now comparable performance to windows
      - for remote-to-remote file copies from windows10 to smbd 4.11.6
        - 1000 x 5K files
          - no change, dreadfully slow, likely problem in KIO internals
        - 1G file
          - compared to 20.04 is ~45% faster
          - within 8% of windows
        - 4G file
          - compared to 20.04 is ~95% faster
          - and somehow 18% faster than windows (could be a fluke)
      
      I've done transfers for 128M, 256M, 512M, 1G, 4G and partially 8G.
      Differences not mentioned are either unchanged, negligible or in line with
      documented trends.
      
      BUG: 291835
      FIXED-IN: 20.08
      
      Test Plan:
      - fallocate -l 1G file
      - copy around
      - copy kio-extras around
      
      Reviewers: ngraham, cfeck, #frameworks, #dolphin
      
      Subscribers: mmustac, meven, hallas, anthonyfieroni, asturmlechner, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27504
      46b5fb42
    • Friedrich W. H. Kossebau's avatar
      Use more UDSEntry::reserve() calls to avoid reallocs on multiple inserts · 7e679b13
      Friedrich W. H. Kossebau authored
      Reviewers: #frameworks, sitter, meven
      
      Reviewed By: meven
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D28538
      7e679b13
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 1f1f355b
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      1f1f355b
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · a22f9fad
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      a22f9fad
  18. 29 Mar, 2020 2 commits
  19. 28 Mar, 2020 1 commit