Spur vs Cog: FileDirectory paths

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Spur vs Cog: FileDirectory paths

Frank Shearar-3
On Cog, we have:

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
=> DosFileDirectory on
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'

but on Spur, we have:

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
 => DosFileDirectory on
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'

Obviously, they can't _both_ be right.

frank

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Frank Shearar-3
On 9 September 2014 17:45, Frank Shearar <[hidden email]> wrote:

> On Cog, we have:
>
> FileDirectory default on:
> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
> => DosFileDirectory on
> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>
> but on Spur, we have:
>
> FileDirectory default on:
> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>  => DosFileDirectory on
> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>
> Obviously, they can't _both_ be right.

(Cog r3072, natch)

frank

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Frank Shearar-3
So this is getting in between me and running/testing external packages
on Spur. The snippet above comes from SqueakMap
(SMFileCache>>directoryForPackageRelease:), so maybe there's a
workaround we can do just by changing how that method uses
FileDirectory?

(Although it does concern me that different VMs are behaving so differently.)

frank

On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:

> On 9 September 2014 17:45, Frank Shearar <[hidden email]> wrote:
>> On Cog, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> => DosFileDirectory on
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> but on Spur, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>  => DosFileDirectory on
>> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> Obviously, they can't _both_ be right.
>
> (Cog r3072, natch)
>
> frank

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Chris Muller-3
I didn't test it but, just eye-balling it, it looks like that crap
code can be replaced with:

    ^ (self directory / 'packages' / aPackageRelease package id
asString36 / aPackageRelease automaticVersionString) assureExistence

.. but don't know whether that will dodge the Spur VM issue or not..



On Wed, Sep 10, 2014 at 4:36 PM, Frank Shearar <[hidden email]> wrote:

> So this is getting in between me and running/testing external packages
> on Spur. The snippet above comes from SqueakMap
> (SMFileCache>>directoryForPackageRelease:), so maybe there's a
> workaround we can do just by changing how that method uses
> FileDirectory?
>
> (Although it does concern me that different VMs are behaving so differently.)
>
> frank
>
> On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
>> On 9 September 2014 17:45, Frank Shearar <[hidden email]> wrote:
>>> On Cog, we have:
>>>
>>> FileDirectory default on:
>>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>> => DosFileDirectory on
>>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>>
>>> but on Spur, we have:
>>>
>>> FileDirectory default on:
>>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>>  => DosFileDirectory on
>>> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>>
>>> Obviously, they can't _both_ be right.
>>
>> (Cog r3072, natch)
>>
>> frank
>

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Eliot Miranda-2
In reply to this post by Frank Shearar-3
Hi Frank,

    I did take a quick look at this but am having difficulty reproducing it.  Whats your exact context?  i.e. is C:\Users\frsheara a mount or a directory on Windows?  What version of Windows are you running?  This does look like a worrying bug...

On Wed, Sep 10, 2014 at 2:36 PM, Frank Shearar <[hidden email]> wrote:
So this is getting in between me and running/testing external packages
on Spur. The snippet above comes from SqueakMap
(SMFileCache>>directoryForPackageRelease:), so maybe there's a
workaround we can do just by changing how that method uses
FileDirectory?

(Although it does concern me that different VMs are behaving so differently.)

frank

On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
> On 9 September 2014 17:45, Frank Shearar <[hidden email]> wrote:
>> On Cog, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> => DosFileDirectory on
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> but on Spur, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>  => DosFileDirectory on
>> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> Obviously, they can't _both_ be right.
>
> (Cog r3072, natch)
>
> frank



--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Nicolai Hess
FileDirectory>>on: path
    "Return another instance"

    ^ self class on: ((path at: 1 ifAbsent: nil) = self pathNameDelimiter
                        ifTrue: [path]
                        ifFalse: [pathName asString, (String with: self pathNameDelimiter), path])

This code does not work on windows, an absolute path does not start with the pathname delimiter :)

this should be delegated to the platform class (DosFileDirectory for Windows).






2014-09-11 0:12 GMT+02:00 Eliot Miranda <[hidden email]>:
Hi Frank,

    I did take a quick look at this but am having difficulty reproducing it.  Whats your exact context?  i.e. is C:\Users\frsheara a mount or a directory on Windows?  What version of Windows are you running?  This does look like a worrying bug...

On Wed, Sep 10, 2014 at 2:36 PM, Frank Shearar <[hidden email]> wrote:
So this is getting in between me and running/testing external packages
on Spur. The snippet above comes from SqueakMap
(SMFileCache>>directoryForPackageRelease:), so maybe there's a
workaround we can do just by changing how that method uses
FileDirectory?

(Although it does concern me that different VMs are behaving so differently.)

frank

On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
> On 9 September 2014 17:45, Frank Shearar <[hidden email]> wrote:
>> On Cog, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> => DosFileDirectory on
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> but on Spur, we have:
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>  => DosFileDirectory on
>> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>>
>> Obviously, they can't _both_ be right.
>
> (Cog r3072, natch)
>
> frank



--
best,
Eliot






Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Bert Freudenberg

On 11.09.2014, at 00:29, Nicolai Hess <[hidden email]> wrote:

FileDirectory>>on: path
    "Return another instance"

    ^ self class on: ((path at: 1 ifAbsent: nil) = self pathNameDelimiter
                        ifTrue: [path]
                        ifFalse: [pathName asString, (String with: self pathNameDelimiter), path])



Where do you see that code? In Squeak 4.5 we have

FileDirectory>>on: fullPath
"Return another instance"

^ self class on: fullPath

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Nicolai Hess


2014-09-11 8:44 GMT+02:00 Bert Freudenberg <[hidden email]>:

On 11.09.2014, at 00:29, Nicolai Hess <[hidden email]> wrote:

FileDirectory>>on: path
    "Return another instance"

    ^ self class on: ((path at: 1 ifAbsent: nil) = self pathNameDelimiter
                        ifTrue: [path]
                        ifFalse: [pathName asString, (String with: self pathNameDelimiter), path])



Where do you see that code? In Squeak 4.5 we have

FileDirectory>>on: fullPath
"Return another instance"

^ self class on: fullPath

- Bert -








Yes, squeak correctly delegates toe the platfom class.

The above code is from the spur image I guessed Frank used for his spur tests.

http://www.mirandabanda.org/files/Cog/VM/SpurImages/2014-09-09/trunk46-spur.image








Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Frank Shearar-3
In reply to this post by Eliot Miranda-2
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".
Chris' snippet looks way better, and works like I want it to. So I
think I'll snitch it and submit it to Trunk.

Sorry for the false alarm!

frank


On 10 September 2014 23:12, Eliot Miranda <[hidden email]> wrote:

> Hi Frank,
>
>     I did take a quick look at this but am having difficulty reproducing it.
> Whats your exact context?  i.e. is C:\Users\frsheara a mount or a directory
> on Windows?  What version of Windows are you running?  This does look like a
> worrying bug...
>
> On Wed, Sep 10, 2014 at 2:36 PM, Frank Shearar <[hidden email]>
> wrote:
>>
>> So this is getting in between me and running/testing external packages
>> on Spur. The snippet above comes from SqueakMap
>> (SMFileCache>>directoryForPackageRelease:), so maybe there's a
>> workaround we can do just by changing how that method uses
>> FileDirectory?
>>
>> (Although it does concern me that different VMs are behaving so
>> differently.)
>>
>> frank
>>
>> On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
>> > On 9 September 2014 17:45, Frank Shearar <[hidden email]>
>> > wrote:
>> >> On Cog, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >> => DosFileDirectory on
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> but on Spur, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>  => DosFileDirectory on
>> >>
>> >> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> Obviously, they can't _both_ be right.
>> >
>> > (Cog r3072, natch)
>> >
>> > frank
>
>
>
>
> --
> best,
> Eliot

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Eliot Miranda-2


On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]> wrote:
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".

Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.
 
Chris' snippet looks way better, and works like I want it to. So I
think I'll snitch it and submit it to Trunk.

Sorry for the false alarm!

No probs.  
 

frank


On 10 September 2014 23:12, Eliot Miranda <[hidden email]> wrote:
> Hi Frank,
>
>     I did take a quick look at this but am having difficulty reproducing it.
> Whats your exact context?  i.e. is C:\Users\frsheara a mount or a directory
> on Windows?  What version of Windows are you running?  This does look like a
> worrying bug...
>
> On Wed, Sep 10, 2014 at 2:36 PM, Frank Shearar <[hidden email]>
> wrote:
>>
>> So this is getting in between me and running/testing external packages
>> on Spur. The snippet above comes from SqueakMap
>> (SMFileCache>>directoryForPackageRelease:), so maybe there's a
>> workaround we can do just by changing how that method uses
>> FileDirectory?
>>
>> (Although it does concern me that different VMs are behaving so
>> differently.)
>>
>> frank
>>
>> On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
>> > On 9 September 2014 17:45, Frank Shearar <[hidden email]>
>> > wrote:
>> >> On Cog, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >> => DosFileDirectory on
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> but on Spur, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>  => DosFileDirectory on
>> >>
>> >> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> Obviously, they can't _both_ be right.
>> >
>> > (Cog r3072, natch)
>> >
>> > frank
>
>
>
>
> --
> best,
> Eliot



--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Ben Coman
Eliot Miranda wrote:


On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]> wrote:
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".

Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.

I didn't see all of this thread, but I presume you are distinguishing between relative and absolute pathnames.  As well as the initial letter-colon, an absolute pathname also requires position 3 to contain a slash.
See the "Paths" section only of... http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths 
cheers -ben

 
Chris' snippet looks way better, and works like I want it to. So I
think I'll snitch it and submit it to Trunk.

Sorry for the false alarm!

No probs.  
 

frank


On 10 September 2014 23:12, Eliot Miranda <[hidden email]> wrote:
> Hi Frank,
>
>     I did take a quick look at this but am having difficulty reproducing it.
> Whats your exact context?  i.e. is C:\Users\frsheara a mount or a directory
> on Windows?  What version of Windows are you running?  This does look like a
> worrying bug...
>
> On Wed, Sep 10, 2014 at 2:36 PM, Frank Shearar <[hidden email]>
> wrote:
>>
>> So this is getting in between me and running/testing external packages
>> on Spur. The snippet above comes from SqueakMap
>> (SMFileCache>>directoryForPackageRelease:), so maybe there's a
>> workaround we can do just by changing how that method uses
>> FileDirectory?
>>
>> (Although it does concern me that different VMs are behaving so
>> differently.)
>>
>> frank
>>
>> On 9 September 2014 17:47, Frank Shearar <[hidden email]> wrote:
>> > On 9 September 2014 17:45, Frank Shearar <[hidden email]>
>> > wrote:
>> >> On Cog, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >> => DosFileDirectory on
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> but on Spur, we have:
>> >>
>> >> FileDirectory default on:
>> >> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>  => DosFileDirectory on
>> >>
>> >> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'
>> >>
>> >> Obviously, they can't _both_ be right.
>> >
>> > (Cog r3072, natch)
>> >
>> > frank
>
>
>
>
> --
> best,
> Eliot



--
best,
Eliot




Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

timrowledge

On 14-09-2014, at 8:44 AM, Ben Coman <[hidden email]> wrote:

> Eliot Miranda wrote:
>>
>> But I'm OK with being told "#on: should only take a relative path,
>> indicating a subdirectory of FileDirectory default; it's not a bug".
>>
>> Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.
>
> I didn't see all of this thread, but I presume you are distinguishing between relative and absolute pathnames.  As well as the initial letter-colon, an absolute pathname also requires position 3 to contain a slash.
> See the "Paths" section only of... http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths 
> cheers -ben

And other OSs have even more interesting rules. Properly delegating to the platform class can handle it, assuming of course that the code does its job.

If I thought we could get away with it in practical terms I’d urge simply disallowing the non-relative path string thing. Not to mention making usage like
FileDirectory default on: 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/‘
a serious offense because of the included improper characters.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Talks to plants on their own level.



Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Bert Freudenberg
In reply to this post by Ben Coman
On 14.09.2014, at 17:44, Ben Coman <[hidden email]> wrote:

Eliot Miranda wrote:


On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]> wrote:
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".

Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.

I didn't see all of this thread, but I presume you are distinguishing between relative and absolute pathnames.  As well as the initial letter-colon, an absolute pathname also requires position 3 to contain a slash.
See the "Paths" section only of... http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths 
cheers -ben

I have no idea why you guys are discussing this. It's all coded up in DosFileDirectory>>fullPathFor:, and working fine.

The only issue seems to be that Eliot made an unwarranted change to FileDirectory>>on: in the Spur image. reverting it should solve the problem.

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Chris Muller-3
On Sun, Sep 14, 2014 at 11:46 AM, Bert Freudenberg <[hidden email]> wrote:

> On 14.09.2014, at 17:44, Ben Coman <[hidden email]> wrote:
>
> Eliot Miranda wrote:
>
>
>
> On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]>
> wrote:
>>
>> Hi Eliot,
>>
>> OK, the good news is it's not a Spur bug. I mistakenly checked spur +
>> trunk46-image.image against cog + trunk-fully-updated. Not the same
>> thing.
>>
>> The bad news is that
>>
>> FileDirectory default on:
>> 'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
>>
>> 'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.
>>
>> But I'm OK with being told "#on: should only take a relative path,
>> indicating a subdirectory of FileDirectory default; it's not a bug".
>
>
> Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking
> to see if the path starts with letter colon.
>
>
> I didn't see all of this thread, but I presume you are distinguishing
> between relative and absolute pathnames.  As well as the initial
> letter-colon, an absolute pathname also requires position 3 to contain a
> slash.
> See the "Paths" section only of...
> http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths
> cheers -ben
>
>
> I have no idea why you guys are discussing this. It's all coded up in
> DosFileDirectory>>fullPathFor:, and working fine.

I think we should try to wind down our use of the stringified API's
and move toward the object-API's.  Instead of asking a FileDirectory
its fullPathFor: someString (or fullNameFor: someString), instead let
the Entry's do some work instead of only being "data objects"..  i.e.,
ask the FileDirectory for its (entryAt: someString) and then send
#fullName.

> The only issue seems to be that Eliot made an unwarranted change to
> FileDirectory>>on: in the Spur image. reverting it should solve the problem.
>
> - Bert -
>

Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Eliot Miranda-2
In reply to this post by Bert Freudenberg


On Sep 14, 2014, at 9:46 AM, Bert Freudenberg <[hidden email]> wrote:

On 14.09.2014, at 17:44, Ben Coman <[hidden email]> wrote:

Eliot Miranda wrote:


On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]> wrote:
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".

Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.

I didn't see all of this thread, but I presume you are distinguishing between relative and absolute pathnames.  As well as the initial letter-colon, an absolute pathname also requires position 3 to contain a slash.
See the "Paths" section only of... http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths 
cheers -ben

I have no idea why you guys are discussing this. It's all coded up in DosFileDirectory>>fullPathFor:, and working fine.

The only issue seems to be that Eliot made an unwarranted change to FileDirectory>>on: in the Spur image. reverting it should solve the problem.

In the Spur image?  Can you point me to it?  I thought I'd left Files unchanged in Spur.  I thought I changed things in trunk.  And if I broke things I'll fix them.



- Bert -






Reply | Threaded
Open this post in threaded view
|

Re: Spur vs Cog: FileDirectory paths

Nicolai Hess

2014-09-14 23:18 GMT+02:00 Eliot Miranda <[hidden email]>:


On Sep 14, 2014, at 9:46 AM, Bert Freudenberg <[hidden email]> wrote:

On 14.09.2014, at 17:44, Ben Coman <[hidden email]> wrote:

Eliot Miranda wrote:


On Thu, Sep 11, 2014 at 1:01 PM, Frank Shearar <[hidden email]> wrote:
Hi Eliot,

OK, the good news is it's not a Spur bug. I mistakenly checked spur +
trunk46-image.image against cog + trunk-fully-updated. Not the same
thing.

The bad news is that

FileDirectory default on:
'C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/' gives
'C:\Users\frsheara\squeak-ci\target\C:/Users/frsheara/squeak-ci/target/cogspur.r3072/cogspurwin/'.

But I'm OK with being told "#on: should only take a relative path,
indicating a subdirectory of FileDirectory default; it's not a bug".

Bah, I'd fix it.  I fixed it for unix.  It's only a little bit of checking to see if the path starts with letter colon.

I didn't see all of this thread, but I presume you are distinguishing between relative and absolute pathnames.  As well as the initial letter-colon, an absolute pathname also requires position 3 to contain a slash.
See the "Paths" section only of... http://msdn.microsoft.com/en-us/library/aa365247.aspx#fully_qualified_vs._relative_paths 
cheers -ben

I have no idea why you guys are discussing this. It's all coded up in DosFileDirectory>>fullPathFor:, and working fine.

The only issue seems to be that Eliot made an unwarranted change to FileDirectory>>on: in the Spur image. reverting it should solve the problem.

In the Spur image?  Can you point me to it?  I thought I'd left Files unchanged in Spur.  I thought I changed things in trunk.  And if I broke things I'll fix them.



FileDirectory
on: path
    "Return another instance"

    ^ self class on: ((path at: 1 ifAbsent: nil) = self pathNameDelimiter
                        ifTrue: [path]
                        ifFalse: [pathName asString, (String with: self pathNameDelimiter), path])


 (eem 4/21/2014 14:57 · path access · 71 implementors · only in change set Files-eem.135  · )

Image
-----
c:\Users\nicolai\Downloads\spur\trunk46-spur.image
Squeak4.5
latest update: #13924
Current Change Set: Unnamed1
Image format 6521 (32 bit)



- Bert -