[Bug 530268] Re: MOVE_SELF handling renames the directory incorrectly
Facundo Batista
facundo at canonical.com
Tue Mar 16 14:27:54 GMT 2010
Note that this bug affects directly the Ubuntu One syncdaemon, because
it scrambles the file paths and mixes the metadata the user has for
them.
--
MOVE_SELF handling renames the directory incorrectly
https://bugs.launchpad.net/bugs/530268
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.
Status in “pyinotify” package in Ubuntu: Confirmed
Bug description:
I have a path fully watched. Rename one directory from "test_dir", to "test_dir_renamed" (note that they "overlap").
So, it gets into process_IN_MOVE_SELF(), and tries to fix the paths that it has in the watch managers.
In the loop where it checks which paths to choose, it gets: "tests/home_dir/root/test_dir_renamed".
The src_path is:
tests/home_dir/root/test_dir
The dest_path is:
tests/home_dir/root/test_dir_renamed
And the code *incorrectly* renames it to:
tests/home_dir/root/test_dir_renamed/renamed
One way to avoid this overlapping issue is to add the "/" to the source_path, so you don't get in the trap of comparing with .startswith().
A patch is attached here that fixes the problem in the described way.
ProblemType: Bug
Architecture: i386
Date: Mon Mar 1 16:46:16 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: python-pyinotify 0.8.9-1ubuntu1
PackageArchitecture: all
ProcEnviron:
PATH=(custom, user)
LANG=es_AR.utf8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
SourcePackage: pyinotify
Uname: Linux 2.6.32-14-generic i686
More information about the Ubuntu-sponsors
mailing list