~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to src/libecryptfs/main.c

  • Committer: mhalcrow@us.ibm.com
  • Date: 2007-12-06 00:07:33 UTC
  • Revision ID: git-v1:fd3840d6dca6be68ff1d67661319d9262668dd83
w/o this I get things like "/rootsecret" instead of "/root/secret"

Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
                goto out;
325
325
        }
326
326
        if (source[0] != '/') {
327
 
                rc = asprintf(&fullpath_source, "%s%s", cwd, source);
 
327
                rc = asprintf(&fullpath_source, "%s/%s", cwd, source);
328
328
        } else
329
329
                rc = asprintf(&fullpath_source, "%s", source);
330
330
        if (rc == -1) {
334
334
                goto out;
335
335
        }
336
336
        if (target[0] != '/') {
337
 
                rc = asprintf(&fullpath_target, "%s%s", cwd, target);
 
337
                rc = asprintf(&fullpath_target, "%s/%s", cwd, target);
338
338
        } else
339
339
                rc = asprintf(&fullpath_target, "%s", target);
340
340
        if (rc == -1) {