public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Jeandel <ejeandel@ens-lyon.fr>
To: linux-msdos@vger.kernel.org
Subject: MFS: possible bad behaviour of the function exists
Date: Sat, 14 Dec 2002 14:38:36 +0100	[thread overview]
Message-ID: <20021214133836.GA1585@ens-lyon.fr> (raw)

Hello,

I encountered the following problem (DOSEMU 1.1.3.4, i'm progressively
updating to 1.1.3.7, but i have not seen anything about this bug in patches
1.1.3.5 through 1.1.3.7)

With lredir, i associated D: with /home/foo, and E: with /home/foo/Games.
Let's say i have a file bar.exe in /home/foo/Games.

Now, in dosemu, if i say : 
PROMPT>D:
PROMPT>cd Games
PROMPT>bar
then bar is executed

However, if i execute :
PROMPT>E:
PROMPT>bar
bar.exe is not found (it is found by "dir", by "type", but i can neither
execute it nor modify it with an editor)

After some debugging, i found that the problem seems to be in mfs.c :
in the function exists, the ENTIRE path is lowercased, whereas the good
behaviour is to lowercase only the DOS part of the path (or rather to
not lowercase anything, cause find_file one line later will do this for us)

That's why i observed this behaviour : in the first case, find_file is
called with /home/foo/games/bar.exe, knowing that the unix part is /home/foo,
and then try any combination of lower and uppercase in games/bar.exe to find
that Games/bar.exe is the good one

In the second case, find_file is called with /home/foo/games/bar.exe,
knowing that the unix part is /home/foo/games (WRONG !), and then find
nothing, cause it will not do anything about the "games" part of the folder.


Then, this bug will cause the failure of any attempt to execute a file 
when the unix part of the path is not lowercase

My suggestion will be to comment/delete the line in exists speaking about
strlowerDOS.


Regards,
Emmanuel








             reply	other threads:[~2002-12-14 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-14 13:38 Emmanuel Jeandel [this message]
2002-12-14 16:40 ` MFS: possible bad behaviour of the function exists J. Solomon Kostelnik
2002-12-14 21:25 ` Bart Oldeman
  -- strict thread matches above, loose matches on Subject: below --
2002-12-15  1:50 Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021214133836.GA1585@ens-lyon.fr \
    --to=ejeandel@ens-lyon.fr \
    --cc=E_Jeandel@mail.dotcom.fr \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox