1. dir() error


There's a problem with dir():

thisdir = { 
                { 
                  {65'A',115's',109'm',70'F',105'i',108'l',101'e',46'.',122'z',105'i',112'p'}, 
                  {100'd',78'N'}, 

It's calling {65'A',115's',109'm',70'F',105'i',108'l',101'e',46'.',122'z',105'i',112'p'} a {100'd',78'N'}, but it isn't, it's a {122'z',105'i',112'p'} file!

Winxp,  
Euphoria Interpreter v4.0.5 development 
Windows, Using Managed Memory 
Revision Date: 2013-02-11 02:10:21, Id: 5981:42b209901e89 

useless

edit:

In winders, years ago, i had changed the .zip association to a winrar file, not a compressed folder designation, i just verified. Stepping thru with gotcha trace and print traps, found a .zip it's NOT calling a dir, and several more it doesn't, and some more that it does. Is calling a .zip file a dir a random thing in Euphoria?

new topic     » topic index » view message » categorize

2. Re: dir() error

kat said...

Is calling a .zip file a dir a random thing in Euphoria?

No. It only seems to happen for directory names that end with ".zip".

What does the Microsoft 'dir' command say about that entry?

new topic     » goto parent     » topic index » view message » categorize

3. Re: dir() error

DerekParnell said...
kat said...

Is calling a .zip file a dir a random thing in Euphoria?

No. It only seems to happen for directory names that end with ".zip".

What does the Microsoft 'dir' command say about that entry?

Says it's a file, which it is.

useless

new topic     » goto parent     » topic index » view message » categorize

4. Re: dir() error

I've already patched my app with the code on http://openeuphoria.org/pastey/224.wc , just so the app would run properly.

useless

new topic     » goto parent     » topic index » view message » categorize

5. Re: dir() error

DerekParnell said...
kat said...

Is calling a .zip file a dir a random thing in Euphoria?

No. It only seems to happen for directory names that end with ".zip".

I believe this is actually a Windoze bug.

From http://msdn.microsoft.com/en-us/library/aa364428(v=vs.85).aspx

msdn said...

Note In rare cases or on a heavily loaded system, file attribute information on NTFS file systems may not be current at the time this function is called. To be assured of getting the current NTFS file system file attributes, call the GetFileInformationByHandle function.

Likewise, from http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx

msdn said...

If you are writing a 32-bit application to list all the files in a directory and the application may be run on a 64-bit computer, you should call the Wow64DisableWow64FsRedirectionfunction before calling FindFirstFile and call Wow64RevertWow64FsRedirection after the last call to FindNextFile. For more information, see File System Redirector.

Basically, there seem to be a number of reasons beyond our control why our Windoze dir() implementation would fail to get an accurate snapshot of a file or the contents of a directory.

DerekParnell said...

What does the Microsoft 'dir' command say about that entry?

A good (nay, required) test, but that command may do things differently behind the scenes/under the hood - so a Windoze bug that affects dir() may not affect 'dir', or vice versa.

new topic     » goto parent     » topic index » view message » categorize

6. Re: dir() error

jimcbrown said...
DerekParnell said...
kat said...

Is calling a .zip file a dir a random thing in Euphoria?

No. It only seems to happen for directory names that end with ".zip".

I believe this is actually a Windoze bug.

From http://msdn.microsoft.com/en-us/library/aa364428(v=vs.85).aspx

msdn said...

Note In rare cases or on a heavily loaded system, file attribute information on NTFS file systems may not be current at the time this function is called. To be assured of getting the current NTFS file system file attributes, call the GetFileInformationByHandle function.

<snip>

That was a good find, jim. I have complained for years about the filesystem getting flakey when busy, it's about time Microsoft admitted there is a problem (which they aren't going to fix).

useless

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu