corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriela Gibson <>
Subject Operations.c: DFGet() called from consumers/dfconvert/main.c
Date Sun, 03 May 2015 22:52:53 GMT
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)) {
                        "%s: File already exists",
          return success;


I also would like to rename int r = 0; to the (a little more obvious) int
success = 0;

What do you think?


Visit my Coding Diary:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message