Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#163 closed enhancement/feature request (fixed)

Make bookmark and center handling consistent

Reported by: SlowRider <geeemmixx@…> Owned by: KaZeR
Priority: minor Milestone: version 0.1.0
Component: core Version:
Severity: Keywords:
Cc:

Description

Navit SVN, built 20080625. I configured navit with the installation prefix /home/user/navit.app so I can simply copy it over to a N810.

Navit reads and writes /home/user/.navit/navit.xml and /home/user/.navit/center.txt but it reads and writes /home/user/navit.app/bin/bookmark.txt instead of ~/.navit/bookmark.txt

IMO it should read and write the bookmarks from/to the latter location as the other two files.

Change History (3)

comment:1 Changed 12 years ago by KaZeR

  • Milestone set to version 0.1.0
  • Owner changed from somebody to KaZeR
  • Status changed from new to assigned

jun 18 16:53:53 <cp15> I would suggest that navit makes a mkdir -p $HOME/.navit and then a cd .navit jun 18 16:54:06 <cp15> Then all files can be read/written from the current directory jun 18 16:54:25 <cp15> And it gives more flexibility for platforms where there is no appropriate $HOME jun 18 16:54:58 <KaZeR> then the cd would fail, and it would r/w from current directory? jun 18 16:56:22 <cp15> Hmm... Or exit with an error message jun 18 16:56:59 <cp15> But on the other hand I like to have multiple instances of navit in the source directory jun 18 16:58:25 <KaZeR> how do you want to deal with the files then? jun 18 17:00:27 <cp15> So if it detects it runs from source code, the cd and mkdir should be left out jun 18 17:00:42 <cp15> Any volunteers to implement this? jun 18 17:01:51 <KaZeR> i guess i can do it. but you'll have to summup a bit what you want exactly jun 18 17:02:55 <cp15> Ok, there is currently a check whether navit runs from source code jun 18 17:03:33 <cp15> If this check is false, check if $HOME/.navit exists (file_exists). If not, do a file_mkdir($HOME/.navit) jun 18 17:04:32 <cp15> then do a getcwd to save the current working directory jun 18 17:04:43 <cp15> and then a chdir($HOME/.navit) jun 18 17:05:03 <cp15> If this chdir fails, print an error message and exit jun 18 17:05:43 <cp15> Everything only if the "run from source code" check is false

comment:2 Changed 12 years ago by KaZeR

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in rev #163

comment:3 Changed 12 years ago by KaZeR

Erm, i meant rev r1414 :)

Note: See TracTickets for help on using tickets.