On Thu, Feb 10, 2011 at 10:47, Bert Huijben <bert_at_qqmail.nl> wrote:
>
>
> > -----Original Message-----
> > From: steveking_at_apache.org [mailto:steveking_at_apache.org]
> > Sent: maandag 7 februari 2011 18:43
> > To: commits_at_subversion.apache.org
> > Subject: svn commit: r1068029 -
> > /subversion/trunk/subversion/libsvn_subr/io.c
>
> <snip>
>
> > svn_error_t *
> > svn_io_set_file_read_write_carefully(const char *path,
> > @@ -3197,10 +3326,24 @@ dir_make(const char *path, apr_fileperms
> > #ifdef APR_FILE_ATTR_HIDDEN
> > if (hidden)
> > {
> > +#ifndef WIN32
> > status = apr_file_attrs_set(path_apr,
> > APR_FILE_ATTR_HIDDEN,
> > APR_FILE_ATTR_HIDDEN,
> > pool);
> > +#else
> > + /* on Windows, use our wrapper so we can also set the
> > + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED attribute */
> > + status = apr_win_file_attrs_set(path_apr,
> > + FILE_ATTRIBUTE_HIDDEN |
> > + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
> > |
> > + FILE_ATTRIBUTE_DIRECTORY,
> > + FILE_ATTRIBUTE_HIDDEN |
> > + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
> > |
> > + FILE_ATTRIBUTE_DIRECTORY,
> > + pool);
>
> Why do you try to set the directory attribute here?
> (You can't turn a file into a directory :))
No, but you have to set the flag when used on a directory since the
function will fail if it's not (the same way you can't turn a file
into a directory, you can't turn a directory into a file).
> But maybe a more interesting question: Maybe we should also set the system attribute to make the directory a bit more hidden?
System files are defined as "A file or directory that the operating
system uses a part of, or uses exclusively. "
.svn folders are not used by the system, neither in part nor exclusively.
So I don't think we should abuse that flag...
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Received on 2011-02-10 13:09:05 CET