recoverjpeg does a chdir to the recovery directory too early
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
recoverjpeg (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm attempting to recover files into a directory called 'recovered'. When I run:
$ recoverjpeg sdd.img -o recovered/
it says:
recoverjpeg: unable to open sdd.img for reading (No such file or directory)
which is objectively not true:
$ ls -l
totaal 7561512
drwxrwxr-x 2 robin robin 4096 jul 16 21:21 recovered
-rw-r--r-- 1 root root 7742685184 jul 16 21:18 sdd.img
-rw-r--r-- 1 root root 294 jul 16 21:18 sdd.log
running it with strace shows what's going on:
chdir("recovered/") = 0
open("./sdd.img", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "recoverjpeg: unable to open ./sd"..., 78recoverjpeg: unable to open ./sdd.img for reading (No such file or directory)
) = 78
exit_group(1) = ?
it should open the file for reading, and then chdir.
Obvious workaround: use the absolute path to the file you're recovering from. Still, I could see this confusing the heck out of someone who doesn't know how to drive strace :)
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: recoverjpeg 2.6-1
ProcVersionSign
Uname: Linux 4.4.0-28-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jul 16 21:23:50 2016
InstallationDate: Installed on 2011-04-26 (1908 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
SourcePackage: recoverjpeg
UpgradeStatus: No upgrade log present (probably fresh install)
This is fixed in recoverjpeg 2.6.1 which has just been released.
See https:/ /www.rfc1149. net/devel/ recoverjpeg/