🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3300

How to determine if a file is in a root directory?

#3300
From: Mark Becker
Date: Tue, 04 Dec 1990 21:34
30 lines
1440 bytes
Hello *

Consider the following situation:

I have a piece of software that, as part of it's normal function,
takes a directory reference from a configuration file and uses that
reference as the top of a directory tree used to contain a bunch of
data files.  This directory is created during execution and wiped out
afterwards.

In order to prevent possible configuration errors and major grief, I
want do a little sanity checking on the reference that the installer
sets up.  Turning this thing loose on someone's root directory could
lead to a disaster.

SUBST is one source of major pain.  Novell netware is another, given
that it can 'map' drive designators to all kinds of strange places
over a network.

Is it possible to determine if a given file or directory is in the
root directory of a disk drive even though it may be SUBST'ed or
Novelled?

Suggestions and/or pointers to relevent information would be
appreciated.

Regards,
Mark
mbeck@ai.mit.edu	-or-	mbmm!mbeck@talcott.harvard.edu
Technical Details
Message-ID: <12201@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!snorkelwacker.mit.edu!ai-lab!mbeck@ai.mit.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!snorkelwacker.mit.edu!ai-lab!mbeck@ai.mit.edu
From: mbeck@ai.mit.edu (Mark Becker)
Newsgroups: comp.os.msdos.programmer
Subject: How to determine if a file is in a root directory?
Message-ID: <12201@life.ai.mit.edu>
Date: 4 Dec 90 21:34:54 GMT
Sender: news@ai.mit.edu
Followup-To: comp.os.msdos.programmer
Lines: 30