Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 240139 - xdg-user-dirs-update doesn't keep local changes
Summary: xdg-user-dirs-update doesn't keep local changes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-user-dirs
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC7Target
TreeView+ depends on / blocked
 
Reported: 2007-05-15 14:00 UTC by Josh Boyer
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-17 03:06:59 UTC


Attachments (Terms of Use)

Description Josh Boyer 2007-05-15 14:00:03 UTC
Description of problem:

xdg-user-dirs-update keeps creating the stupid Download, Pictures, Video, etc
directories in my home directory even if I manually edit .config/user-dirs.dirs

Version-Release number of selected component (if applicable):

xdg-user-dirs-0.6-1.fc7

How reproducible:

Always

Steps to Reproduce:
1. Delete the Pictures, Download, Documents, Video, Templates directories
2. Edit .config/user-dirs.dirs
3. Run xdg-user-dirs-update
  
Actual results:

Local changes are removed and the directories are recreated

Expected results:

Local changes are honored.

Additional info:

According to .config/user-dirs.dirs:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 

However this isn't keeping the local changes at all.

Comment 1 Matthias Clasen 2007-05-15 15:22:42 UTC
Can you explain step 2 in more detail ?

Comment 2 Josh Boyer 2007-05-15 15:34:35 UTC
(In reply to comment #1)
> Can you explain step 2 in more detail ?

Sure.  I change this:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_DOWNLOAD_DIR="$HOME/Download"

to this:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_TEMPLATES_DIR="$HOME"
XDG_PUBLICSHARE_DIR="$HOME"
XDG_DOCUMENTS_DIR="$HOME"
XDG_MUSIC_DIR="$HOME"
XDG_PICTURES_DIR="$HOME"
XDG_VIDEOS_DIR="$HOME"
XDG_DOWNLOAD_DIR="$HOME"

and xdg-user-dirs-update changes it back (while also reordering them in the file
for some reason)



Comment 3 Matthias Clasen 2007-05-15 16:44:42 UTC
ah, I can confirm that. 

Comment 4 Matthias Clasen 2007-05-15 16:48:45 UTC
It seems not happy if you set things back to $HOME. You can set it to 
$HOME/. as a workaround for now.

Comment 5 Matthias Clasen 2007-05-15 16:55:00 UTC
Alex, can you have a look at this ?

It looks like it may be enough to remove the *value == 0 check in load_user_dirs().

Comment 6 Josh Boyer 2007-05-15 17:23:01 UTC
(In reply to comment #4)
> It seems not happy if you set things back to $HOME. You can set it to 
> $HOME/. as a workaround for now.

Yep, this workaround works for me.  Thanks for responding so quickly.


Comment 7 Alexander Larsson 2007-05-16 08:39:05 UTC
Fix in xdg-user-dirs-0.8-1.fc7


Comment 8 Matthias Clasen 2007-05-17 03:06:59 UTC
This has been tagged for F7.


Note You need to log in before you can comment on or make changes to this bug.