Forward slashes in filenames on native directories

2 views
Skip to first unread message

Payton Byrd

unread,
Mar 25, 2013, 12:21:28 AM3/25/13
to uIEC-...@googlegroups.com
Ingo, Jim,

I have an idea for solving the problem with / in filenames on native directories.  What if you were to always attempt to find a P00/S00/U00 file on the current path that matches the requested filename before attempting to parse the request for a directory?

So, trying to open "c/base" would first look for a file named "c/base" instead of parsing directory "c" and then file "base".  If that fails, THEN parse the directory and search for the file in the subdirectory.

Ingo Korb

unread,
Mar 25, 2013, 6:00:38 PM3/25/13
to uIEC-...@googlegroups.com
I suspect I'm misunderstanding you request because I think the last
version that would've tried to parse "c/base" as the file base in the
subdirectory c instead of a file called "c/base" in the current
directory was 0.6 or maybe even an earlier one.

Assuming for simplicity that the file name received from the computer
did not contain a path component (which must be separated from the file
name by a colon), the current release checks the file name against a
list of the files in the current directory and not any of the
subdirectories. P00/... files are already resolved to their internal
name in that list, so if there is a P00 file that specifies "c/base" as
the internal name, loading "c/base" will find it.

Just to be safe I just tested this file structure:

foo a subdirectory
bar a file in the foo directory
foo/bar a file in the current directory, stored in P00 format

Loading "foo/bar" did load the file named "foo/bar" and not the file
"bar" in the subdirectory foo.

-ik

Payton Byrd

unread,
Mar 26, 2013, 3:02:27 PM3/26/13
to uIEC-...@googlegroups.com, m...@akana.de
That's interesting because any time I try to load a file with "/" in the filename through the kernal routines or JD the open fails.  I'm using at least version 0.10 so it should be working. 

Ingo Korb

unread,
Mar 26, 2013, 3:40:23 PM3/26/13
to uIEC-...@googlegroups.com
Payton Byrd <plb...@gmail.com> writes:

> That's interesting because any time I try to load a file with "/" in the
> filename through the kernal routines or JD the open fails. I'm using at
> least version 0.10 so it should be working.

Please provide more details.

-ik

Payton Byrd

unread,
Mar 26, 2013, 3:48:52 PM3/26/13
to uIEC-...@googlegroups.com
I get a file not found error.  



--
You received this message because you are subscribed to a topic in the Google Groups "µIEC Users Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/uIEC-users/jzIAijtpqDE/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to uIEC-users+...@googlegroups.com.
To post to this group, send email to uIEC-...@googlegroups.com.



--
Payton Byrd
<http://www.paytonbyrd.com>
<http://it.toolbox.com/blogs/paytonbyrd>

Ingo Korb

unread,
Mar 26, 2013, 6:38:02 PM3/26/13
to uIEC-...@googlegroups.com
Payton Byrd <plb...@gmail.com> writes:

>> > That's interesting because any time I try to load a file with "/" in the
>> > filename through the kernal routines or JD the open fails. I'm using at
>> > least version 0.10 so it should be working.

Please provide more relevant details.

-ik

Payton Byrd

unread,
Mar 28, 2013, 1:35:45 PM3/28/13
to uIEC-...@googlegroups.com, m...@akana.de
Create a small program in BASIC.

Using Jiffy or some other wedge, type @X2 to put into x00 mode

Type save "a/test",11 or whatever your SD2IEC drive is.

The error light blinks.

Read the error channel, you will get "39,FILE NOT FOUND,03,00"
 

Ingo Korb

unread,
Mar 28, 2013, 4:36:06 PM3/28/13
to uIEC-...@googlegroups.com
Payton Byrd <plb...@gmail.com> writes:

> Create a small program in BASIC.
>
> Using Jiffy or some other wedge, type @X2 to put into x00 mode
>
> Type save "a/test",11 or whatever your SD2IEC drive is.
>
> The error light blinks.
>
> Read the error channel, you will get "39,FILE NOT FOUND,03,00"

Now that's a much better problem report than "I get a file not found
error".

If you really used "@X2" then it's not a problem in the firmware -
sending X2 as a command does nothing and does not generate an error
message either. The command you meant is XE2, which changes the
extension mode.

Even if it was just a typo in the message there is still one more caveat
that I have absolutely no influence over: JiffyDOS will interpret @XE2
locally on the C64 as a command to set the destination drive and does
not send anything to the drive. To force JiffyDOS to send a command that
starts with an X you need to put a quote in front of it, i.e.

@"XE2

Similar issues apply with the time command starting with T - JiffyDOS
will try to open a file on the disk to type its contents to the
screen. Users of the Action Replay have the same problem with the C
command to copy files, the AR just starts its internal file copier.

-ik

Payton Byrd

unread,
Mar 28, 2013, 10:56:30 PM3/28/13
to uIEC-...@googlegroups.com, m...@akana.de
Ingo, thank you so much for this post.  Using @"XE2 made all the difference.
 
Reply all
Reply to author
Forward
0 new messages