summaryrefslogtreecommitdiff
path: root/src/recover.c
diff options
context:
space:
mode:
authorrobi <robi>2010-08-09 01:28:33 +0000
committerrobi <robi>2010-08-09 01:28:33 +0000
commit496517231f4c1542de0575a7a5d4737e6ce530cd (patch)
treedab5641c026a9d2cbd470b97aa356fc3bb687e0f /src/recover.c
parentbdb8f3d78f14005c420e064589cd14dcd9c9eff4 (diff)
Bug 017425
Diffstat (limited to 'src/recover.c')
-rw-r--r--src/recover.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/recover.c b/src/recover.c
index daad216..f089a34 100644
--- a/src/recover.c
+++ b/src/recover.c
@@ -291,6 +291,9 @@ int recover_file( char* des_dir,char* pathname, char* filename, struct ext2_inod
printf("RECOVER : INODE=%ld FILENAME=%s/%s\n",inode_nr, pathname,filename);
dump_inode(stdout, "",inode_nr, (struct ext2_inode *)inode, 0);
#endif
+
+ if (!(inode->i_mode & LINUX_S_IFMT)) //no type flag - no recover
+ return 1;
p1 = pathname;
while (*p1 == '/') p1++;
@@ -525,6 +528,9 @@ int check_file_recover(struct ext2_inode *inode){
int retval =-1;
struct alloc_stat stat;
+ if (!(inode->i_mode & LINUX_S_IFMT)) // no type flag
+ return 0;
+
stat.allocated = 0;
stat.not_allocated = 0;
if ((! inode->i_blocks) || (LINUX_S_ISLNK(inode->i_mode) && (inode->i_size < EXT2_N_BLOCKS*4)) ||