Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.
This repository was archived by the owner on May 1, 2018. It is now read-only.

Deal with remote audio files with the same name but different letter case #23

@deltaidea

Description

@deltaidea

Suppose you have two remote audio files: "FOO - BAR" and "foo - bar".

When you sync them down, you'd expect two local files: "FOO - BAR.mp3" and "foo - bar.mp3".

But Windows has a case insensitive file system, so these two names will cause a conflict.
What will happen now is one of the remote files will get deleted:

  • "FOO - BAR.mp3" gets created with "FOO - BAR" song.
  • "foo - bar.mp3" will be attempted to be created, but the fs will just redirect actions to the already existing "FOO - BAR.mp3" file. So the "foo - bar" song will get downloaded to the same file overwriting previous song. No error will be thrown, so vk-sync will suppose that the file has been downloaded successfully.
  • On the next round of syncing (currently every 15 s) vk-sync will see that the "foo - bar.mp3" file doesn't exist in the list of files in the local directory => surely, the user deleted it => should delete it on the remote too to keep everything in sync.

In most cases two files get added to the vk audio list purely by accident: you forget that you've already added that song a year ago, so you add it again. It's hard to detect that manually.

Still, should probably at least notify the user about that kind of conflict and ask what to do.

It would be pretty difficult to download both files with some kind of prefixes or suffixes and then keep track of them. So should just ask which one to keep and mark the other appropriately until one of them is removed by the user - then we can download the other just fine - there's no reason not to anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions