On 16 December 2017 at 04:34, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Le 15/12/2017 à 21:24, Hilaire a écrit :
In P3:
FileSystem disk workingDirectory =>File @ /home/hilaire/Travaux/Developpement/DrGeoII/Dev-pharo3.0/shared
In P7:
FileSystem disk workingDirectory =>File @ /home/hilaire
Is it a bug?
Hi!
In Pharo 3
workingDirectory = imageDirectory.
In Pharo 7
workingDirectory = directory from where Pharo was launched.
just double-checking... with equivalent shell commands... $ DIR1 = `pwd` $ $DIR2/pharo $DIR3/Pharo.image Pharo 3 ==> workingDirectory = $DIR3 Pharo 7 ==> workingDirectory = $DIR1 ? I wonder for such a semantic API change it might be good to introduce #workDirectory and deprecate #workingDirectory so the need for user-devs to change their code is more explicit. It might make easier to have an auto-conversion rule #workingDirectory ==> #imageDirectory, and make it harder to shoot yourself in the foot producing cross-platform libraries. cheers -ben
Maybe you launched Pharo from the terminal with this command like this one?
Travaux/Developpement/DrGeoII/Dev-pharo3.0/shared/pharo-ui Travaux/Developpement/DrGeoII/Dev-pharo3.0/shared Pharo.image
If you wish to use the old behaviour, you can replace `FileSystem disk workingDirectory` by `FileLocator imageDirectory asFileReference`.
This change was done because, not getting the real working directory make it really hard to script things in Pharo.
-- Cyril Ferlicot https://ferlicot.fr
http://www.synectique.eu 2 rue Jacques Prévert 01, 59650 Villeneuve d'ascq France