Not enough space on connected USB drive when recovering (Windows Version, ophotorec)
Latest pre-compiled Win x64 Version-
Restoring to a standard (FAT32) External empty 512GB HDD from the local 2568GB SSD in Win10
I get "There is not enough space left! Please free disk space and/or choose another destination"
which is related to PSTATUS_ENOSPC switch/case here https://github.com/cgsecurity/testdisk/blob/master/src/qphotorec.cpp https://github.com/cgsecurity/testdisk/blame/master/src/phrecn.c
It might be related to the old open issue https://github.com/cgsecurity/testdisk/issues/9

as I only selected doc, pdf and zip as the file options I am guessing some >4GB zip/tmp file is being written and I cannot skip this part.
- Is there any option to skip such a file?
- Is there a switch to only restore files < 20MB as I am not interested in the large ones (but I need ZIP to get back small lost DOCX and XLSX files)
- I know that maybe reformatting the external drive to NTFS might help with file size limits, but still for me this counts as a bug as there is ample space and a bit more info in the popup might also help in debugging this issue
https://github.com/cgsecurity/testdisk_documentation/blob/master/photorec.rst now contains "Avoid choosing a FAT32 filesystem for the destination as it doesn't handle file over 4 GB.". See https://www.cgsecurity.org/testdisk.pdf for the generated pdf
I don't plan to implement customizable file size limits.
What do you suggest to replace "There is not enough space left! Please free disk space and/or choose another destination" ? ""There is not enough space left! Please free disk space and/or choose another destination (Avoid FAT32)" ?
Thanks for the prompt reply Christophe,
let me start by saying I really appreciate the software and was already able to rescue a lot of data!
As more and more less tech-savvy people start using tools like this, and as external USB HDD are often pre-formatted FAT this is a real issue and was even confusing to me. If I had used an (internal) drive with ext4 on Linux I wouldn't have even noticed.
I am not a C programmer (html, js, php mostly), so excuse for only giving suggestions and not offering a PR
- Idea 1 Before starting: Check the filesystem of the selected destination and offer the "4GB FAT" warning at selection when the user presses "c" for current directory
- Idea 2 Show the filesize (and extension/file group it belongs to) in human readable form (K/M/G bytes) that failed to save.
- Idea 3: You could add "Note: If you are restoring to a FAT/FAT32 filesystem, files larger than 4GB cannot be saved. See FAQ for more"
- Idea 4: Manage that text string centrally, so the response is the same in ophotorec, phrenc (and possible testdisk) for that error https://github.com/cgsecurity/testdisk/blob/fb96d07f8c91e1ca8ee222eae327d42893fd1ace/src/phbf.c#L232 https://github.com/cgsecurity/testdisk/blob/d9919bf2773e74958a6fcc56249d539b8e4454b5/src/phrecn.c#L128 https://github.com/cgsecurity/testdisk/blob/master/src/qphotorec.cpp#L858
@cgsecurity I just retried the steps - this time with an NTFS formatted 65GB drive. After the restore of 207 files (about 1GB) it hangs again with not enough space? Any idea why this happens (latest 64bit version of photorec under win10 was used)
@leotulipan were you able to find a solution? I and using a NTFS HDD and am getting the same message :/