[Pharo-dev] Two Surprising and Scary FS Behaviors
stepharo at netcourrier.com
Tue Aug 6 02:28:19 EDT 2019
I like your analysis because indeed it can bring bad news.
Can you turn this behaviour into memory file system tests?
So that we make sure that we should find a solution.
> On 6 Aug 2019, at 00:41, Sean P. DeNigris <sean at clipperadams.com> wrote:
> I may be ignorant of some key principle in the filesystem world, but IMHO
> conceptually, `location / somethingElse` should always return either
> location or something inside of it, unless the request explicitly requests
> otherwise (e.g. location / '..'). To do otherwise could be disastrous.
> Behavior #1
> rootDataFolder := FileLocator home / 'a' / 'b' / .
> subfolderName := self accidentallyReturnAnEmptyString.
> assumedToBeInRootData := rootDataFolder / subfolderName.
> assumedToBeInRootData deleteAll.
> "I hope I have a recent machine backup, because..."
> assumedToBeInRootData resolve = FileLocator root resolve. "WTH?!"
> Behavior 2 (similar)
> Path * 'a' / 'b' / '/' = Path root. "WTH?!"
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
More information about the Pharo-dev