Changeset 560318


Ignore:
Timestamp:
09/29/2015 10:18:04 PM (9 years ago)
Author:
Calum Lind <calumlind+deluge@gmail.com>
Children:
4b9dcf
Parents:
244ae87
git-author:
Calum Lind <calumlind+deluge@gmail.com> (09/28/2015 06:05:43 PM)
git-committer:
Calum Lind <calumlind+deluge@gmail.com> (09/29/2015 10:18:04 PM)
Message:

#2703 [Core] Stop moving files if target files exist

Location:
deluge/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • deluge/core/torrent.py

    r244ae87 r560318  
    856856                return False
    857857
     858        kwargs = {}
     859        if deluge.common.VersionSplit(lt.version) >= deluge.common.VersionSplit("1.0.0.0"):
     860            kwargs['flags'] = 1  # fail_if_exist
    858861        dest_bytes = dest.encode('utf-8')
    859862        try:
    860863            # libtorrent needs unicode object if wstrings are enabled, utf8 bytestring otherwise
    861864            try:
    862                 self.handle.move_storage(dest)
     865                self.handle.move_storage(dest, **kwargs)
    863866            except TypeError:
    864                 self.handle.move_storage(dest_bytes)
     867                self.handle.move_storage(dest_bytes, **kwargs)
    865868        except Exception, e:
    866869            log.error("Error calling libtorrent move_storage: %s" % e)
  • deluge/core/torrentmanager.py

    r244ae87 r560318  
    10651065            return
    10661066
     1067        log.error("Torrent %s, %s", torrent_id, decode_string(alert.message()))
    10671068        if torrent_id in self.waiting_on_finish_moving:
    10681069            self.waiting_on_finish_moving.remove(torrent_id)
Note: See TracChangeset for help on using the changeset viewer.