~longsleep/snapcraft/snapcraft-debs-plugin

« back to all changes in this revision

Viewing changes to snapcraft/sources.py

  • Committer: Snappy Tarmac
  • Author(s): Sergio Schvezov
  • Date: 2015-09-15 21:02:02 UTC
  • mfrom: (143.9.9 snapcraft)
  • Revision ID: snappy_tarmac-20150915210202-ir46ij16qra2fwtw
Support config by sergiusens approved by sergiusens,chipaca

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
 
178
178
    def provision(self, dst):
179
179
        path = os.path.abspath(self.source)
180
 
        if os.path.isdir(dst):
 
180
        if os.path.islink(dst):
 
181
            os.remove(dst)
 
182
        elif os.path.isdir(dst):
181
183
            os.rmdir(dst)
182
184
        else:
183
185
            os.remove(dst)