View previous topic :: View next topic |
Author |
Message |
Ligustah
Joined: 21 Oct 2007 Posts: 45 Location: Berlin, Germany
|
Posted: Sun Oct 21, 2007 1:15 pm Post subject: Exceptions in iolib |
|
|
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 |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Sun Oct 21, 2007 3:23 pm Post subject: |
|
|
While I do think its a bug, try something like "\\" or "C:" and see if it works. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Sun Oct 21, 2007 3:47 pm Post subject: |
|
|
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 |
|
|
Ligustah
Joined: 21 Oct 2007 Posts: 45 Location: Berlin, Germany
|
Posted: Mon Oct 22, 2007 8:11 am Post subject: |
|
|
JarrettBillingsley wrote: | I'll make a testcase and put a ticket in the Tango project. |
Fine.
Mfg Ligustah
Btw: I love MiniD Great work |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Tue Oct 23, 2007 9:47 pm Post subject: |
|
|
Ligustah wrote: | JarrettBillingsley wrote: | I'll make a testcase and put a ticket in the Tango project. |
Fine.
Mfg Ligustah
Btw: I love MiniD Great work |
I put the issue in Tango, and thanks 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 |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Fri Oct 26, 2007 7:28 am Post subject: |
|
|
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 |
|
|
Ligustah
Joined: 21 Oct 2007 Posts: 45 Location: Berlin, Germany
|
Posted: Fri Oct 26, 2007 7:38 am Post subject: |
|
|
Cool *tango update* *minid update*
Mfg Ligustah |
|
Back to top |
|
|
|