summaryrefslogtreecommitdiffstats
path: root/sorter.py
diff options
context:
space:
mode:
authorGravatar ryuslash2010-04-07 23:30:59 +0200
committerGravatar ryuslash2010-04-07 23:30:59 +0200
commitdfaa24b1b680cae0b24dad6761b0970eab0ba2c9 (patch)
treefa1f90e86ed9c7e4fdfaa2a93b0a4c8bb114693c /sorter.py
parentd58d0292023287167e6b03a997edd2258c2a9834 (diff)
download4grab-dfaa24b1b680cae0b24dad6761b0970eab0ba2c9.tar.gz
4grab-dfaa24b1b680cae0b24dad6761b0970eab0ba2c9.zip
Error with archive
The archive function in sorter.py didn't archive to .arch, now it does
Diffstat (limited to 'sorter.py')
-rw-r--r--sorter.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/sorter.py b/sorter.py
index dbaadba..4022b55 100644
--- a/sorter.py
+++ b/sorter.py
@@ -60,7 +60,7 @@ class Sorter:
self.copy(filename, folderpath)
break
- self.archive(filename)
+ self.archive(filename)
self.remove(filename)
return retval
@@ -77,10 +77,6 @@ class Sorter:
dest = os.path.join(dest,
os.path.basename(filename))
-
- #today = datetime.date.today()
- #dest = os.path.join(dest,
- # "%d-%d-%d" % (today.year, today.month, today.day))
if source != dest:
shutil.copy(source, dest)
@@ -88,12 +84,12 @@ class Sorter:
print "\nHow can this even happen?! Copying", source, "to", dest
def archive(self, filename):
- download_base = self.conf.get_download_location()
location = self.conf.get_archive_location()
if not os.path.exists(location):
os.makedirs(location)
- dest = os.path.join(location, filename)
+ dest = os.path.join(location, os.path.basename(filename))
+ #print dest
f = open(dest, "w")
file.close(f)