{"action":"created","issue":{"url":"https://api.github.com/repos/beetbox/beets/issues/2746","repository_url":"https://api.github.com/repos/beetbox/beets","labels_url":"https://api.github.com/repos/beetbox/beets/issues/2746/labels{/name}","comments_url":"https://api.github.com/repos/beetbox/beets/issues/2746/comments","events_url":"https://api.github.com/repos/beetbox/beets/issues/2746/events","html_url":"https://github.com/beetbox/beets/issues/2746","id":276235079,"number":2746,"title":"beet import deletes my files","user":{"login":"imp1sh","id":3486156,"avatar_url":"https://avatars0.githubusercontent.com/u/3486156?v=4","gravatar_id":"","url":"https://api.github.com/users/imp1sh","html_url":"https://github.com/imp1sh","followers_url":"https://api.github.com/users/imp1sh/followers","following_url":"https://api.github.com/users/imp1sh/following{/other_user}","gists_url":"https://api.github.com/users/imp1sh/gists{/gist_id}","starred_url":"https://api.github.com/users/imp1sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imp1sh/subscriptions","organizations_url":"https://api.github.com/users/imp1sh/orgs","repos_url":"https://api.github.com/users/imp1sh/repos","events_url":"https://api.github.com/users/imp1sh/events{/privacy}","received_events_url":"https://api.github.com/users/imp1sh/received_events","type":"User","site_admin":false},"labels":[{"id":29900975,"url":"https://api.github.com/repos/beetbox/beets/labels/needinfo","name":"needinfo","color":"e102d8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-22T23:52:18Z","updated_at":"2018-03-03T04:41:14Z","closed_at":null,"author_association":"NONE","body":"### Problem\r\n\r\nI've been running through import procedures quite a lot of time.\r\nWhat I just did now is rebuild my database, cause for other reasons I don't have my db file. So I run`beet import /mnt/audio/alben` while the target directory for imported files is exactly the same as the source.\r\nAll just worked fine up until there was a piece from Anouk that wanted some updating.\r\nhttps://paste.debian.net/997152/\r\n\r\nI already was working on the next import iteration when suddenly an error message appeared saying \"No such file or directory\". The beet import procedure suddenly aborted. Now my files are gone.\r\nThat's what's left:\r\n```\r\n/mnt/audio/alben/Anouk % find .\r\n.\r\n./Anouk - Who,s Your Momma\r\n./Anouk - Who,s Your Momma/AlbumArt_{46F6B46A-5CE7-47E5-B325-E1EC83B621DC}_Small.jpg\r\n./Anouk - Who,s Your Momma/AlbumArt_{46F6B46A-5CE7-47E5-B325-E1EC83B621DC}_Large.jpg\r\n./Anouk - Who,s Your Momma/album.nfo\r\n./Anouk - Who,s Your Momma/Folder.jpg\r\n./Anouk - Who,s Your Momma/desktop.ini\r\n./Anouk - Who,s Your Momma/AlbumArtSmall.jpg\r\n./Anouk - Who,s Your Momma/12 Good God (The Anonymous Remix).mp3\r\n./Who's Your Momma\r\n```\r\n\r\n\r\nRunning this command in verbose (`-vv`) mode:\r\ncan't do it again...\r\n\r\n\r\nHere's a link to the music files that trigger the bug (if relevant): \r\ngone\r\n\r\n### Setup\r\n\r\n* OS: FreeBSD Jail 11.0\r\n* Python version: 2.7.14\r\n* beets version: 1.4.2\r\n* Turning off plugins made problem go away (yes/no): \r\nno plugins loaded\r\n\r\nMy configuration (output of `beet config`) is:\r\n\r\n```yaml\r\nbeet config\r\ndirectory: /mnt/audio/alben\r\n\r\nimport:\r\n    move: yes\r\nlibrary: ~/beetslibrary.blb\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/beetbox/beets/issues/comments/370117734","html_url":"https://github.com/beetbox/beets/issues/2746#issuecomment-370117734","issue_url":"https://api.github.com/repos/beetbox/beets/issues/2746","id":370117734,"user":{"login":"jr0n","id":7552236,"avatar_url":"https://avatars1.githubusercontent.com/u/7552236?v=4","gravatar_id":"","url":"https://api.github.com/users/jr0n","html_url":"https://github.com/jr0n","followers_url":"https://api.github.com/users/jr0n/followers","following_url":"https://api.github.com/users/jr0n/following{/other_user}","gists_url":"https://api.github.com/users/jr0n/gists{/gist_id}","starred_url":"https://api.github.com/users/jr0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jr0n/subscriptions","organizations_url":"https://api.github.com/users/jr0n/orgs","repos_url":"https://api.github.com/users/jr0n/repos","events_url":"https://api.github.com/users/jr0n/events{/privacy}","received_events_url":"https://api.github.com/users/jr0n/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T04:41:14Z","updated_at":"2018-03-03T04:41:14Z","author_association":"NONE","body":"This is a pretty nasty bug that is simple to reproduce on my machine. \r\n\r\n`user@DESKTOP:~/.config/beets$ beet remove -d\r\nerror: No matching items found.\r\nuser@DESKTOP:~/.config/beets$ beet import /mnt/c/Users/1/Desktop/testtag/\r\n\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC) (13 items)\r\nCorrecting tags from:\r\n    Freezepop - Future Future Future Perfect (Limited Edition)\r\nTo:\r\n    Freezepop - Future Future Future Perfect\r\nURL:\r\n    https://musicbrainz.org/release/a82503b2-3bda-4fa1-ac72-be0bc7698d49\r\n(Similarity: 98.2%) (album, tracks) (CD, 2007, US, Archenemy Record Company, limited edition)\r\n * Get Drunk With Me         -> Get Drunk With Milk (title)\r\n * Do You Like My Wang?      -> Do You Like My Wang™? (title)\r\n * Afterparty (Extended Mix) -> Afterparty (extended mix)\r\n[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,\r\nEnter search, enter Id, aBort? A\r\nError: No such file or directory while copying /mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/08 - Freezepop - Do You Like My Wang .flac to /mnt/c/Users/1/Desktop/beets/F/Freezepop-Future_Future_Future_Perfect-2007/08-Do_You_Like_My_Wang™?.flac\r\nuser@DESKTOP:~/.config/beets$ beet remove -d\r\n\r\n/mnt/c/Users/1/Desktop/beets/F/Freezepop-Future_Future_Future_Perfect-2007/01-Less_Talk_More_Rokk.flac - Less Talk More Rokk\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/02 - Freezepop - Pop Music Is Not a Crime.flac - Pop Music Is Not a Crime\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/03 - Freezepop - Frontload.flac - Frontload\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/04 - Freezepop - Thought Balloon.flac - Thought Balloon\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/05 - Freezepop - Get Drunk With Me.flac - Get Drunk With Milk\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/06 - Freezepop - Ninja of Love.flac - Ninja of Love\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/07 - Freezepop - Brainpower.flac - Brainpower\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/08 - Freezepop - Do You Like My Wang .flac - Do You Like My Wang™?\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/09 - Freezepop - He Says She Says.flac - He Says She Says\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/10 - Freezepop - Do You Like Boys .flac - Do You Like Boys?\r\n/mnt/c/Users/1/Desktop/testtag/(2007) Future Future Future Perfect (Limited Edition) (FLAC)/11 - Freezepop - Retired Tennis Pro.flac - Retired Tennis Pro\r\n/mnt/c/Users/1/Desktop/beets/F/Freezepop-Future_Future_Future_Perfect-2007/12-Swimming_Pool.flac - Swimming Pool\r\n/mnt/c/Users/1/Desktop/beets/F/Freezepop-Future_Future_Future_Perfect-2007/13-Afterparty_(extended_mix).flac - Afterparty (extended mix)\r\nReally DELETE 13 files (y/n)? y`\r\n\r\nAs you can see, beets is deleting from both the source and destination path.\r\n\r\nBeets config:\r\n`library: library.db\r\ndirectory: /mnt/c/Users/1/Desktop/beets/\r\nimport:\r\n    timid: yes\r\n #   autotag: no\r\n\r\nmusicbrainz:\r\n    searchlimit: 10\r\n\r\nmatch:\r\n    preferred:\r\n        media: ['CD']\r\n        original_year: yes\r\n    ignored: missing_tracks unmatched_tracks\r\n\r\nreplace:\r\n    '\\s+': _\r\n\r\npaths:\r\n    default: %left{$albumartist,1}/$albumartist-$album-$year/$track-$title`\r\n\r\nRemoving the replace option in the config eliminates the issue."}}
{"actor":{"display_login":"jr0n"}}