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

Change timestamp characters #13

Open
kencinder opened this issue Mar 29, 2018 · 8 comments
Open

Change timestamp characters #13

kencinder opened this issue Mar 29, 2018 · 8 comments

Comments

@kencinder
Copy link

I run my server on my Linux box, but often access via Windows network shares. Timestamps contain :, an illegal character in Windows, which is thus mangled to DOS filename constraints by Samba, making the folder name completely unreadable. 2018-03-28_23:58 displays as 2SY35O~Q

If timestamps could be printed as hh.mm or hhmm that would be far better.

@alexbobp
Copy link
Member

Ah, I didn't really think of that. I just made it look pretty on linux, and then later changed the behavior on windows when I realized it caused crashes. But you make a very good point. I think the best solution would be for me to add a config option to force the windows timestamp format (with hh.mm) regardless of platform, does that sound good?

@kencinder
Copy link
Author

Whatever is easiest for you, that works for me.

@alexbobp
Copy link
Member

Here you go. Sorry for the very slow turnaround time, I've been busy and also I wanted to make sure this feature included migration code to rename existing backups, since BTFU expects to be able to enumerate existing backups and parse the datestamps.

It adds a config option for whether to use windows-friendly timestamps, with the default value set based on your current platform. If you change the value and restart minecraft, it will rename all your backups to the other format. (turning this option off on windows will surely cause a nice crash.)

This is the commit, if you care: 515d991

I want to do a bit more testing before I do a version bump and push a new release, but I think it works, and if you'd like to try it out, get a build from https://ci.elytradev.com/job/elytra/job/BTFU/job/multi-version/3/

@kencinder
Copy link
Author

No problem, thanks. I've only had cause to rollback once so far, and I just sorted by date/time to make it easier to find, but this option will make it much easier to see when looking at backups over SMB.

@alexbobp
Copy link
Member

I'm keeping this open for a bit longer until I make a release that includes this change. Hopefully kencider is using the CI build, since I haven't heard back from them. (Ken, let me know if there are any issues, or if you need this change in a release build ASAP, otherwise it's going to come along with a few other features when they're ready)

@kencinder
Copy link
Author

I was actually waiting on your release, but I can definitely test a CI build if you need me to.

@alexbobp
Copy link
Member

Well now I feel like a bit of a jerk! That means you've been waiting weeks...

Like I said, that CI build I linked is working fine. But I can do a release soon. There is one other minor config feature being worked on (backup only while players are online), and between the two of these, surely it's worth a release. I still have a lot to work on though, to achieve BTFU's hopes and dreams!

@kencinder
Copy link
Author

Don't feel like a jerk...this was a minor nuisance issue, I only waited to see what a release held.

Only doing backups when players are online sounds great, especially for us as ours is a friends+family private server where there are often times nobody is on.

If you don't need me to test a CI build, I'm perfectly fine with waiting for a full release build...especially with the above feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants