Bug in NTFSFilename on 7.4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in NTFSFilename on 7.4

Runar Jordahl
On Windows a file might exists (i.e. you can see that the file exists
in the file system), but it might not be readable (for you) due to
security missing for that file. To test this, make a test file
(c:\temp\test.txt) and change its security to "deny" yourself read
access to it. Then try to evaluate:

'c:\temp\test.txt' asFilename isReadable. "Works ok, answers true"
'c:\temp\test.txt' asFilename readStream. "Fails with an OsInaccessibleError."

Even if seeing that the file exists, is not the same as having read
access to it, NTFSFilename assumes that if the file exists, it can
also be read. Look at Filename>>isReadable (which NTFSFilename
inherits). This methods simply calls #exists.

I suggest that NTFSFilename>>isReadable is overridden to test properly
whether the file is actually readable. Note that this has been done
for UnixFilename, but this method has a small bug according to the
method comment(!). As a start, the method could be added along the
lines of the UNIX implementation:

isReadable
        "Answer true if the file is readable. Implemented by opening the file
for reading, then closing it.
        BUG: This doesn't work if the file is a directory!"

        ^[
        (PCDiskFileAccessor openFileReadOnly: self) close.
        true] on: OsInaccessibleError errorSignal do: [:ex | ex return: false]

Reply | Threaded
Open this post in threaded view
|

Ctrl+A in the Inspector Irrits

Michael Lucas-Smith
As we all know, the evil ctrl+a in the inspector bug still lurks. I've just published TrippyCtrlASelectTextNotList to public store. I think the name of the package says it all really ;)

Michael

Reply | Threaded
Open this post in threaded view
|

RE: Ctrl+A in the Inspector Irrits

Boris Popov, DeepCove Labs (SNN)
Ctrl+A in the Inspector Irrits
I don't even think its a bug, pretty sure its a feature and I love it :) Disabling it makes it really hard to see all the fields at the same time, whereas previously hitting Ctrl+A would show you all the fields,
 
-self:  an ApplicationWindow nil
handle:  nil
width:  500
height:  400
background:  a DevicePaint
inputOrigin:  [hidden email]
creationOrigin:  [hidden email]
sensor:  an EventSensor
.....
dropTarget:  nil
dragDropInProgress:  nil
dragDropTracker:  nil
 
A better fix may be to check where the current focus is and act accordingly, so that if you're in the text pane, do the test select, otherwise select all fields.
 
Whatcha think?
 
Cheers!
 
-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.


From: Michael Lucas-Smith [mailto:[hidden email]]
Sent: Mon 24/07/2006 3:59 AM
To: vwnc-list
Subject: Ctrl+A in the Inspector Irrits

As we all know, the evil ctrl+a in the inspector bug still lurks. I've just published TrippyCtrlASelectTextNotList to public store. I think the name of the package says it all really ;)

Michael

Reply | Threaded
Open this post in threaded view
|

Re: Ctrl+A in the Inspector Irrits

Steve Aldred
Boris Popov wrote:
> I don't even think its a bug, pretty sure its a feature and I love it
> :) Disabling it makes it really hard to see all the fields at the same
> time, whereas previously hitting Ctrl+A would show you all the fields,
Isn't there a toolbar button to do just that? Hardly 'really hard.

Perverting 'standard' keystrokes to do something non-standard is just
bad UI practice. I only use the cut/paste accelerators in VW as
everything else always does something non-standard.

Steve A