[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: log-addressing index creation needs to handle pre-existing files

From: Philip Martin <philip_at_codematters.co.uk>
Date: Tue, 10 Dec 2013 18:52:23 +0000

Philip Martin <philip.martin_at_wandisco.com> writes:

> Philip Martin <philip_at_codematters.co.uk> writes:
>
>> ../src/subversion/libsvn_subr/io.c:3432: (apr_err=EACCES)
>> svn: E000013: Can't open file '/home/pm/sw/subversion/obj2/repo/db/revs/0/1.l2p': Permission denied
>
> I fixed this with r1549924, but I don't know if Windows needs some other
> than EACCES:
>
> + err = svn_io_file_open(index_file, file_name,
> + APR_WRITE | APR_CREATE | APR_TRUNCATE
> + | APR_BUFFERED,
> + APR_OS_DEFAULT, pool);
> +
> + /* ### Do we need another check, EEXIST say, on Windows FAT32? */
> + if (!err || !first || !APR_STATUS_IS_EACCES(err->apr_err))
> + break;

I suppose we could also use our standard pattern of writing to a
temporary file and then moving into place, that probably handles these
permissions problems.

-- 
Philip
Received on 2013-12-10 19:52:54 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.