On Monday, May 4, 2015, Gabriela Gibson <gabriela.gib...@gmail.com> wrote:
> Right now, consumers/dfconvert/main.c is doing a lot of work but only > checks it has a file to put it in at the very end of it's effort, in > Operations.c. If the file already exists, it bails out with an a error. > > I would propose that we do this instead of that, in Operations.c: 355, ie, > we move the check right up to to point at which we can immediately tell if > the work done is in vain: > > int DFGetFile(const char *concreteFilename, > const char *abstractFilename, > DFError **error) > { > int success = 0; > > if (DFFileExists(abstractFilename)) { > DFErrorFormat(error, > "%s: File already exists", > abstractFilename); > return success; > } > > ... > > I also would like to rename int r = 0; to the (a little more obvious) int > success = 0; > > What do you think? sounds logical to me. rgds jan i > > G > > -- > Visit my Coding Diary: http://gabriela-gibson.blogspot.com/ > -- Sent from My iPad, sorry for any misspellings.