1860 sstr_t fname = ucx_sprintf("locktoken-%s.txt", syncdirname); |
1860 sstr_t fname = ucx_sprintf("locktoken-%s.txt", syncdirname); |
1861 char *path = config_file_path(fname.ptr); |
1861 char *path = config_file_path(fname.ptr); |
1862 free(fname.ptr); |
1862 free(fname.ptr); |
1863 |
1863 |
1864 FILE *file = fopen(path, "w"); |
1864 FILE *file = fopen(path, "w"); |
1865 if(!file) { |
1865 if(file) { |
|
1866 fprintf(file, "%s\n", locktoken); |
|
1867 fclose(file); |
|
1868 return path; |
|
1869 } else { |
1866 perror("Cannot create locktoken file"); |
1870 perror("Cannot create locktoken file"); |
1867 free(path); |
1871 free(path); |
1868 } |
1872 return NULL; |
1869 |
1873 } |
1870 fprintf(file, "%s\n", locktoken); |
1874 } |
1871 fclose(file); |
1875 |
1872 return path; |
|
1873 } |
|
1874 |
|