Show More
@@ -170,9 +170,9 b' class abstractvfs(object):' | |||||
170 | def mkdir(self, path=None): |
|
170 | def mkdir(self, path=None): | |
171 | return os.mkdir(self.join(path)) |
|
171 | return os.mkdir(self.join(path)) | |
172 |
|
172 | |||
173 |
def mkstemp(self, suffix='', prefix='tmp', dir=None |
|
173 | def mkstemp(self, suffix='', prefix='tmp', dir=None): | |
174 | fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, |
|
174 | fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix, | |
175 |
dir=self.join(dir) |
|
175 | dir=self.join(dir)) | |
176 | dname, fname = util.split(name) |
|
176 | dname, fname = util.split(name) | |
177 | if dir: |
|
177 | if dir: | |
178 | return fd, os.path.join(dir, fname) |
|
178 | return fd, os.path.join(dir, fname) | |
@@ -333,9 +333,8 b' class vfs(abstractvfs):' | |||||
333 | return |
|
333 | return | |
334 | os.chmod(name, self.createmode & 0o666) |
|
334 | os.chmod(name, self.createmode & 0o666) | |
335 |
|
335 | |||
336 |
def __call__(self, path, mode="r", |
|
336 | def __call__(self, path, mode="r", atomictemp=False, notindexed=False, | |
337 |
|
|
337 | backgroundclose=False, checkambig=False, auditpath=True): | |
338 | auditpath=True): |
|
|||
339 | '''Open ``path`` file, which is relative to vfs root. |
|
338 | '''Open ``path`` file, which is relative to vfs root. | |
340 |
|
339 | |||
341 | Newly created directories are marked as "not to be indexed by |
|
340 | Newly created directories are marked as "not to be indexed by | |
@@ -373,7 +372,7 b' class vfs(abstractvfs):' | |||||
373 | self.audit(path, mode=mode) |
|
372 | self.audit(path, mode=mode) | |
374 | f = self.join(path) |
|
373 | f = self.join(path) | |
375 |
|
374 | |||
376 |
if |
|
375 | if "b" not in mode: | |
377 | mode += "b" # for that other OS |
|
376 | mode += "b" # for that other OS | |
378 |
|
377 | |||
379 | nlink = -1 |
|
378 | nlink = -1 |
General Comments 0
You need to be logged in to leave comments.
Login now