168
147
# we try without making the directory first because thats optimising
170
149
weave = self._versionedfile_class(_filename, self._transport, self._file_mode, create=True,
172
151
except errors.NoSuchFile:
174
153
# unexpected error - NoSuchFile is expected to be raised on a
175
154
# missing dir only and that only occurs when we are prefixed.
177
156
self._transport.mkdir(self.hash_prefix(file_id), mode=self._dir_mode)
179
158
self._file_mode, create=True,
180
160
**self._versionedfile_kwargs)