Create a directory named 1.1.1

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Create a directory named 1.1.1

Post by yaronnir »

I get an extention named '1'??

Do you differ the directory (FILE_ATTRIBUTE_DIRECTORY) from files for extentions? Or is this a normal behavior of X2?


thanks
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

everything with a dot in its name is considered "extension"
works for .zip files, not so well with .1 files :)
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

not necesarily

Post by yaronnir »

consider this:

1 file named "1.zip"

1 file named "2.txt"

1 directory named "nikos"

1 directory named "nikos.author.xplorer2"

the extention for the last entry will be "explorer2" but it is a directory? so why present an extention at all?

or again maybe i am missing something out?
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

but .zip is a folder too! (for XP)
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Post by yaronnir »

so use the 'FILE_ATTRIBUTE_COMPRESSED' to distinguish between a true directory (FILE_ATTRIBUTE_DIRECTORY) and a zip folder file.....no?
User avatar
kishorfarm
Member
Member
Posts: 10
Joined: 2005 Mar 13, 11:13
Location: Málaga

Re: not necesarily

Post by kishorfarm »

yaronnir wrote:1 directory named "nikos"

1 directory named "nikos.author.xplorer2"
In my 1.2 lite it does work well. No extension showed but directory instead.
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

'FILE_ATTRIBUTE_COMPRESSED' doesn't represent zip files!
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Post by yaronnir »

you are right, my bad  :D

it is one of the annoying windows properties on a file ....


so, question remains, is there no way to distinguish between a folder and a zip file?
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

yes, zipfolders don't have FILE_ATTRIBUTE_DIRECTORY
but x2 isn't checking this attribute for folders anyway
trust me, if there was a clean way to exclude folders i'd do it!
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Post by yaronnir »

Funny how microsoft hides whatever she doesn't want to user to mingle with.....


the only think i could come up with regarding the zip folders in XP is 3 COM dlls that are stored in SYSTEM32 directory:

1.Dunzip32.dll - Responsible for decompressing files stored in a compressed folder or file when they are copied, extracted, or executed

2. Dzip32.dll: Responsible for compressing files when they are put into a compressed folder or file.

3. Zipfldr.dll: Contains the shell extensions for Compressed Folders.

the files above are un-documented, non-understandable, OLE View shows nothing for these COM dlls.

the only way i can think of is to monitor this 3 files when ever a zip folder operation is in action and to try to understand using reverse engineering

other than that, we are back to point 0 :(