mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
macOS file fixes
This commit is contained in:
parent
d5e024c43e
commit
ba56fc25ab
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,17 @@ public class FileNames {
|
|||
return path + "/";
|
||||
}
|
||||
|
||||
public static String removeTrailingSlash(String path) {
|
||||
if (path.equals("/")) {
|
||||
return path;
|
||||
}
|
||||
|
||||
if (path.endsWith("/") || path.endsWith("\\")) {
|
||||
return path.substring(0, path.length() - 1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public static String getFileName(String file) {
|
||||
if (file.isEmpty()) {
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue