Issue 5279 in pharo: files enh from squeak by eem

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

Issue 5279 in pharo: files enh from squeak by eem

pharo
Status: Accepted
Owner: [hidden email]

New issue 5279 by [hidden email]: files enh from squeak by eem
http://code.google.com/p/pharo/issues/detail?id=5279

relativeNameIfAbsoluteFor: aFileName
        "Answer either the relative name for aFileName, if aFileName names a file  
in me or
         subdirectories, or aFileName's absolute path if it isn't in me or  
subdirectories.
         P.S. Ths is what I'd expect relativeNameFor: to do, but it is taken and  
means
         exactly the opposite, i.e. the absolute path for a relative name."
        | fullNameSize fullName fileNameSize |
        (aFileName isEmpty or: [aFileName first ~= self pathNameDelimiter]) ifTrue:
                [self error: 'this method expects an absolute filename'].
        fullNameSize := (fullName := self fullName) size.
        fileNameSize := aFileName size.
        ^(aFileName beginsWith: fullName)
                ifTrue: [(fileNameSize = fullNameSize
                                or: [fileNameSize - 1 = fullNameSize
                                        and: [(aFileName at: fileNameSize) = self pathNameDelimiter]])
                                        ifTrue: [self class currentDirectoryNickname]
                                        ifFalse: [aFileName copyFrom: fullNameSize + 2 to: fileNameSize]]
                ifFalse: [aFileName]

        "SourceFiles asArray collect: [:sf| FileDirectory default  
relativeNameIfAbsoluteFor: sf fullName]"
        "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default  
fullName" "should be dot"
        "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default  
fullName, FileDirectory default slash" "should also be dot"



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5279 in pharo: files enh from squeak by eem

pharo
Updates:
        Status: FixReviewNeeded

Comment #1 on issue 5279 by [hidden email]: files enh from squeak by  
eem
http://code.google.com/p/pharo/issues/detail?id=5279

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5279 in pharo: files enh from squeak by eem

pharo
Updates:
        Labels: Type-Bug Milestone-1.4

Comment #2 on issue 5279 by [hidden email]: files enh from squeak by  
eem
http://code.google.com/p/pharo/issues/detail?id=5279

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5279 in pharo: files enh from squeak by eem

pharo
Updates:
        Status: Workneeded

Comment #3 on issue 5279 by [hidden email]: files enh from squeak by  
eem
http://code.google.com/p/pharo/issues/detail?id=5279

next step: Slice or cs. Copy and paste is so much work that nobody will  
review this.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5279 in pharo: files enh from squeak by eem

pharo

Comment #4 on issue 5279 by [hidden email]: files enh from squeak by  
eem
http://code.google.com/p/pharo/issues/detail?id=5279

Considering that we want to move to FS, do we need this?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5279 in pharo: files enh from squeak by eem

pharo
Updates:
        Labels: -Milestone-1.4

Comment #5 on issue 5279 by [hidden email]: files enh from squeak by  
eem
http://code.google.com/p/pharo/issues/detail?id=5279

Not a show stopper for releasing 1.4. (but *if* someone posts code, we are  
happy to consider it to 1.4.. but nobody needs to stay awake and fix it  
before we can release 1.4)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker