Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Hardcoded file separator #2

Open
QiAnXinCodeSafe opened this issue Feb 12, 2020 · 0 comments
Open

Hardcoded file separator #2

QiAnXinCodeSafe opened this issue Feb 12, 2020 · 0 comments

Comments

@QiAnXinCodeSafe
Copy link

String folder = writePath.get() + "/" + timestamp;

The path split symbol problem is different for different operating systems. Hard-coded file separators should not be used. Instead, use a platform-independent API provided by the language library,such as java.io.File.separator or java.lang.System.getProperty("file.separator")

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

No branches or pull requests

1 participant