mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fixes to the parsing of file dirs
This commit is contained in:
parent
a243a78f5a
commit
828615ad07
2 changed files with 4 additions and 4 deletions
|
@ -36,7 +36,7 @@ config = ConfigParser.ConfigParser()
|
||||||
|
|
||||||
class ClientFile:
|
class ClientFile:
|
||||||
def __init__(self, filename, actual_size, actual_md5):
|
def __init__(self, filename, actual_size, actual_md5):
|
||||||
self.pathname = confdict['incomingdir'] + filename
|
self.pathname = os.path.join(confdict['incomingdir'], filename)
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.fd = open(self.pathname, "a+b")
|
self.fd = open(self.pathname, "a+b")
|
||||||
self.actual_size = actual_size
|
self.actual_size = actual_size
|
||||||
|
@ -62,7 +62,7 @@ class ClientFile:
|
||||||
|
|
||||||
def finishDownload(self):
|
def finishDownload(self):
|
||||||
self.fd.close()
|
self.fd.close()
|
||||||
newpathname = confdict['cachedir'] + self.filename
|
newpathname = os.path.join(confdict['cachedir'], self.filename)
|
||||||
os.rename(self.pathname, newpathname)
|
os.rename(self.pathname, newpathname)
|
||||||
self.pathname = newpathname
|
self.pathname = newpathname
|
||||||
self.fd = open(self.pathname, "a+b")
|
self.fd = open(self.pathname, "a+b")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[tupkgs]
|
[tupkgs]
|
||||||
port = 1034
|
port = 1034
|
||||||
cachedir = '/var/cache/tupkgs/'
|
cachedir = /var/cache/tupkgs
|
||||||
incomingdir = '/var/cache/tupkgs/incomplete/'
|
incomingdir = /var/cache/tupkgs/incomplete
|
||||||
|
|
||||||
[mysql]
|
[mysql]
|
||||||
username = aur
|
username = aur
|
||||||
|
|
Loading…
Add table
Reference in a new issue