1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-17 12:48:24 +01:00

remove method removeCWD(String)

This commit is contained in:
soloturn 2022-04-02 09:32:58 +02:00
parent 76b2bc80bb
commit 9d66f41584
3 changed files with 2 additions and 12 deletions

View File

@ -265,7 +265,7 @@ public abstract class AbstractHTMLRipper extends AbstractRipper {
}
LOGGER.debug("Downloading " + url + "'s description to " + saveFileAs);
if (!saveFileAs.getParentFile().exists()) {
LOGGER.info("[+] Creating directory: " + Utils.removeCWD(saveFileAs.getParent()));
LOGGER.info("[+] Creating directory: " + saveFileAs.getParent());
saveFileAs.getParentFile().mkdirs();
}
return true;

View File

@ -339,7 +339,7 @@ public abstract class AbstractRipper
}
LOGGER.debug("Downloading " + url + " to " + saveFileAs);
if (!saveFileAs.getParentFile().exists()) {
LOGGER.info("[+] Creating directory: " + Utils.removeCWD(saveFileAs.getParent()));
LOGGER.info("[+] Creating directory: " + saveFileAs.getParent());
saveFileAs.getParentFile().mkdirs();
}
if (Utils.getConfigBoolean("remember.url_history", true) && !isThisATest()) {

View File

@ -362,16 +362,6 @@ public class Utils {
return url;
}
/**
* Removes the current working directory from a given filename
*
* @param file Path to the file
* @return 'file' without the leading current working directory
*/
public static String removeCWD(String file) {
return removeCWD(Paths.get(file));
}
/**
* Get a list of all Classes within a package. Works with file system projects
* and jar files! Borrowed from StackOverflow, but I don't have a link :[