From: Daniel Martí Date: Fri, 15 Jan 2016 12:16:01 +0000 (+0100) Subject: Fix issue related to creating fdroidvcs file X-Git-Tag: 0.7.0~86^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=23a950bd00f9f6e8606bf3165aa3f89573d9acec;p=fdroidserver.git Fix issue related to creating fdroidvcs file --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ce5179ce..6eaab936 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -531,6 +531,7 @@ class vcs: # automatically if either of those things changes. fdpath = os.path.join(self.local, '..', '.fdroidvcs-' + os.path.basename(self.local)) + fdpath = os.path.normpath(fdpath) cdata = self.repotype() + ' ' + self.remote writeback = True deleterepo = False @@ -562,7 +563,8 @@ class vcs: # If necessary, write the .fdroidvcs file. if writeback and not self.clone_failed: - with open(fdpath, 'w') as f: + os.makedirs(os.path.dirname(fdpath), exist_ok=True) + with open(fdpath, 'w+') as f: f.write(cdata) if exc is not None: