MOVE_SELF handling renames the directory incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyinotify (Ubuntu) |
Fix Released
|
High
|
James Westby | ||
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 the loop where it checks which paths to choose, it gets: "tests/
The src_path is:
tests/
The dest_path is:
tests/
And the code *incorrectly* renames it to:
tests/
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
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=es_AR.utf8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: pyinotify
Uname: Linux 2.6.32-14-generic i686
Related branches
- Ubuntu branches: Pending requested
-
Diff: 85 lines (+67/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/fix_path_overlap_in_move_self.patch (+59/-0)
debian/patches/series (+1/-0)
Changed in pyinotify (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in pyinotify (Ubuntu): | |
assignee: | nobody → James Westby (james-w) |
milestone: | none → ubuntu-10.04-beta-2 |
Changed in pyinotify (Ubuntu): | |
importance: | Medium → High |
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.