mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-25 17:07:26 -04:00
macOS file fixes
This commit is contained in:
@@ -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 "";
|
||||
|
||||
Reference in New Issue
Block a user