Commits

Johannes Schindelin  committed 866cae0

link_temp_to_file: call adjust_shared_perm() only when we created the directory

  • Participants
  • Parent commits e23ed9a

Comments (0)

Files changed (1)

 	dir = strrchr(filename, '/');
 	if (dir) {
 		*dir = 0;
-		mkdir(filename, 0777);
-		if (adjust_shared_perm(filename)) {
+		if (!mkdir(filename, 0777) && adjust_shared_perm(filename)) {
 			*dir = '/';
 			return -2;
 		}