FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exceptions in iolib

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
Ligustah



Joined: 21 Oct 2007
Posts: 45
Location: Berlin, Germany

PostPosted: Sun Oct 21, 2007 1:15 pm    Post subject: Exceptions in iolib Reply with quote

Hi!
I have just played around with the io lib. I found out that using io.listDirs or io.listFiles may throw real tango exception on windows if the folder, that you want to scan, is not accessible for the current user. Furthermore io.makeDir will not create folders in C:\. The following code:
Code:
io.changeDir("C:\\");
io.makeDir("blubb");

will print something like "invalid path : C:\\blubb
whereas
Code:
io.changeDir("C:\\Windows\\");
io.makeDir("blubb");
works fine. I don't know, if it is a tango bug or if there's something wrong with the iolib.

Mfg Ligustah
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Sun Oct 21, 2007 3:23 pm    Post subject: Reply with quote

While I do think its a bug, try something like "\\" or "C:" and see if it works.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Sun Oct 21, 2007 3:47 pm    Post subject: Reply with quote

Quote:
I found out that using io.listDirs or io.listFiles may throw real tango exception on windows if the folder, that you want to scan, is not accessible for the current user.


Oops, didn't wrap those calls in code to translate the Tango exceptions to MiniD exceptions. I'll have to change that.

Quote:
io.makeDir will not create folders in C:\


This I believe is a bug in Tango's FilePath.create() function. I'll make a testcase and put a ticket in the Tango project.
Back to top
View user's profile Send private message
Ligustah



Joined: 21 Oct 2007
Posts: 45
Location: Berlin, Germany

PostPosted: Mon Oct 22, 2007 8:11 am    Post subject: Reply with quote

JarrettBillingsley wrote:
I'll make a testcase and put a ticket in the Tango project.

Fine.
Mfg Ligustah


Btw: I love MiniD Smile Great work Wink
Back to top
View user's profile Send private message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Tue Oct 23, 2007 9:47 pm    Post subject: Reply with quote

Ligustah wrote:
JarrettBillingsley wrote:
I'll make a testcase and put a ticket in the Tango project.

Fine.
Mfg Ligustah


Btw: I love MiniD Smile Great work Wink


I put the issue in Tango, and thanks Smile Hopefully it'll be fixed in the next day or so, at which time you'll be able to update to the most recent Tango snapshot.
Back to top
View user's profile Send private message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Fri Oct 26, 2007 7:28 am    Post subject: Reply with quote

OK, the creating directories in the root issue wasn't really an issue; update to the latest revision of Tango and it should go away. (Or just grab the newest tango.io.FilePath, that's the only file that really matters.)

And I just fixed the listDirs/listFiles issue. Grab r224.
Back to top
View user's profile Send private message
Ligustah



Joined: 21 Oct 2007
Posts: 45
Location: Berlin, Germany

PostPosted: Fri Oct 26, 2007 7:38 am    Post subject: Reply with quote

Cool Smile *tango update* *minid update*

Mfg Ligustah
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group