diff options
author | Martin Szulecki | 2011-04-28 19:44:22 +0200 |
---|---|---|
committer | Martin Szulecki | 2011-04-28 19:44:22 +0200 |
commit | bc03e4c80d1035a633ae0c921c44d5725785b8aa (patch) | |
tree | 870326e2fd63224344a6f7e20bc98e4d11d02b10 | |
parent | d9d8fc2f9f90fdd77c971e45c3be8e9b0548e9d4 (diff) | |
download | libimobiledevice-bc03e4c80d1035a633ae0c921c44d5725785b8aa.tar.gz libimobiledevice-bc03e4c80d1035a633ae0c921c44d5725785b8aa.tar.bz2 |
idevicebackup2: Use errno_to_device_error() for other operations, too
-rw-r--r-- | tools/idevicebackup2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 006dd33..1219601 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1491,10 +1491,9 @@ checkpoint: gchar *oldpath = g_build_path(G_DIR_SEPARATOR_S, backup_directory, key, NULL); remove(newpath); - //fprintf(stderr, "Moving '%s' to '%s'\n", oldpath, newpath); if (rename(oldpath, newpath) < 0) { printf("Renameing '%s' to '%s' failed: %s (%d)\n", oldpath, newpath, strerror(errno), errno); - errcode = -errno; + errcode = errno_to_device_error(errno); errdesc = strerror(errno); break; } @@ -1532,8 +1531,8 @@ checkpoint: g_free(str); if (remove(newpath) < 0) { printf("Could not remove '%s': %s (%d)\n", newpath, strerror(errno), errno); - //errcode = -errno; - //errdesc = strerror(errno); + errcode = errno_to_device_error(errno); + errdesc = strerror(errno); } g_free(newpath); } |