File size

Hi all,

In my minifilter I am stripping out some data from my file.

But now if I want to zip it ,its giving me some error that “original size
does not match with the file size of the file to be processed”,because of
stripped data.

Is this means that FSD is not changing its file size,should I need to
explicitly change it.

Any other ideas?most welcome

Regards,

Ruhina

The file size reported after file open (IRP_MJ_QUERY_INFORMATION)
does not match the file size in the directory entry (IRP_MJ_QUERY_DIRECTORY).

Winzip checks the file size from directory entry first, then opens the
file and queries the file size again. If these two numbers do not match,
you are blamed that the archive is corrupt.

L.

Hi Ladislav,

Could you please elaborate a little .How can I manipulate Directory
information buffers in my minifilter.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Tuesday, March 14, 2006 7:14 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] File size

The file size reported after file open (IRP_MJ_QUERY_INFORMATION)

does not match the file size in the directory entry
(IRP_MJ_QUERY_DIRECTORY).

Winzip checks the file size from directory entry first, then opens the

file and queries the file size again. If these two numbers do not match,

you are blamed that the archive is corrupt.

L.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Could you please elaborate a little .How can I manipulate

Directory information buffers in my minifilter.

This is kinda not easy thing. Your filter probably can get the

real file size only after opening file (my guess). If you want to

keep WinZip happy, you must ensure that the directory entry

contains exactly same size like the one reported by

GetFileInformation IRP after file open. But if you will open each

file in query directory call, your filter will significantly degrade

performance of the whole system.

There is no easy solution to this known to me.

L.

But I am filtering this only for text files…like all kind of source files.

One more problem is my filter is inserting some header in text files for
each IRP_MJ_CREATE and remove header in IRP_MJ_READ.

It is working fine MS Visual studia ,MS word etc… but not with notepad.I
think it is because of Memory mapped I/O in notepad.

Any suggestions for it.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Thursday, March 16, 2006 12:24 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] File size

Could you please elaborate a little .How can I manipulate

Directory information buffers in my minifilter.

This is kinda not easy thing. Your filter probably can get the

real file size only after opening file (my guess). If you want to

keep WinZip happy, you must ensure that the directory entry

contains exactly same size like the one reported by

GetFileInformation IRP after file open. But if you will open each

file in query directory call, your filter will significantly degrade

performance of the whole system.

There is no easy solution to this known to me.

L.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com