Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using filewatch and relative local_path #30

Closed
4ndr345 opened this issue Mar 25, 2020 · 4 comments
Closed

Problems using filewatch and relative local_path #30

4ndr345 opened this issue Mar 25, 2020 · 4 comments
Labels
wontfix This will not be worked on

Comments

@4ndr345
Copy link

4ndr345 commented Mar 25, 2020

Steps to reproduce:

  1. create a test configuration config.yaml
  2. in config.yaml set local_path to .\\S3
  3. start s3sync-service
  4. create new file test.txt in S3 folder.

Expected behavior:

The file test.txt will be synced with AWS S3

Observed behavior:

The file test.txt is not synced with AWS S3

Comments:

The problem is that filepath.Rel returns an error. The reason is the following. The file watcher returns an absolute filePath for example C:\\Users\\TestUser\\S3\\test.txt. Computing the relative path from C:\\Users\\TestUser\\S3\\test.txt and .\\S3 results in an error. The current workaround is to always use an absolute local_path in the configuration.

If help is needed I can create an pull request with a possible fix.

OS: Windows 10 Pro
Go version: go1.14 windows/amd64

@mazay
Copy link
Owner

mazay commented Mar 26, 2020

Hello, thanks for reporting this bug! Unfortunately, the proposed workaround would break the bucket_path functionality thus we need to take a closer look into that.

@mazay mazay added the bug Something isn't working label Mar 26, 2020
@4ndr345
Copy link
Author

4ndr345 commented Mar 26, 2020

@mazay I don't see why it would break the bucket_path. But it maybe could break the initial sync. I will investigate the problem a bit more. And FYI I don't propose my workaround as a fix. It is only a temporary solution for me to get it working.

@mazay
Copy link
Owner

mazay commented Mar 26, 2020

@4ndr345 I see now, I misunderstood you :)
I think the problem is quite similar to #29 and seems to be related to the generateS3Key and windows path specifics. I need to spin up win env for further debugging.

@mazay
Copy link
Owner

mazay commented Apr 4, 2020

Hi @4ndr345, alter a closer look it turned out that relative local_path is known to lead to the sync issues and it doesn't seem to be a bug, the application was designed to use absolute path. I'll update the documentation accordingly.

@mazay mazay added wontfix This will not be worked on and removed bug Something isn't working labels Apr 4, 2020
@mazay mazay closed this as completed in f8d2b57 Apr 4, 2020
mazay added a commit that referenced this issue Apr 4, 2020
Upgrade golang to 1.14.1. Fix #29. Close #30.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants