[Cuis-dev] fix for leading tilda in DirectoryEntry, or am I going about this the wrong way?
Juan Vuletich
juan at cuis.st
Mon Jul 24 06:28:14 PDT 2023
Hi Imran,
I agree you identified a problem. But I don't like to interpret '~' as
two different folders depending on the presence of OSProcess.
I think that the correct behavior would be to give an error message if
OSProcess is not present.
What do others think?
Thanks,
On 7/24/2023 10:08 AM, Imran Rafique via Cuis-dev wrote:
> Hello list,
>
> I'm hesitant to call this a bugfix, as its quite possible (probable?)
> that I'm going about this the wrong way (or I've grasped the wrong end
> of the stick), but here goes:
>
> Original behaviour:
> '~/foo' asDirectoryEntry => <image_dir>/foo
>
> Should be:
> <user_home_dir>/foo
>
> I think I understand the real issue: without OSProcess, there's no way
> for the system to know what $HOME is. Perhaps<image_dir> is
> considered as a reasonable fallback (in which case, disregard the rest
> of this).
>
> Details:
> - the attached changeset is a manually-extracted portion of one of my
> local packages (with just the code pertaining to this issue)
> - it modifies FileIOAccessor>> absolutePathComponentsFor: so that it
> behaves differently and correctly interprets '~' ONLY if OSProcess is
> loaded.
> - which means that DirectoryEntry would give different answers for the
> same '~/whatever' depending on the state of the image. This is
> probably bad practice on my part, but anyway, it was annoying me.
>
>
> If this is a bogus fix, please excuse the noise to the list. Either
> way, the learning experience is a blast (just starting to get the hang
> of the debugger).
>
> --
> Regards,
> Imran Sher Rafique
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list