Thread (29 messages) flat view 29 messages, 7 authors, 2016-06-15

Re: "git clone" executed as root on solaris 10 shreds UFS (it is possible to create hardlinks for directories as root under solaris)

From: Thomas Glanzmann <hidden>
Date: 2016-06-15 22:43:21

Hello,

entry.c line 17:

        static void create_directories(const char *path, const struct checkout *state)
        {
        ...
                        if (mkdir(buf, 0777)) {
=>                              if (errno == EEXIST) {
                                        struct stat st;
=>                                      if (len > state->base_dir_len && state->force && !unlink(buf) && !mkdir(buf, 0777))
                                                continue;
                                        if (!stat(buf, &st) && S_ISDIR(st.st_mode))
                                                continue; /* ok */
                                }
                                die("cannot create directory at %s", buf);
                        }
        ...

I think here is the problem. I don't understand what the code should do
actually. Or why the directory is deleted and re-created (maybe something todo
with permissions)?

        Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help