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

Fix Issue #1066 #1092

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/main/java/swati4star/createpdf/util/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public class Constants {

public static final String LAUNCH_COUNT = "launch_count";

public static final String pdfDirectory = "/PDF Converter/";
public static final String pdfDirectory = "/Download/";
public static final String pdfExtension = ".pdf";
public static final String appName = "PDF Converter";
public static final String PATH_SEPERATOR = "/";
public static final String PATH_SEPARATOR = "/";
public static final String textExtension = ".txt";
public static final String excelExtension = ".xls";
public static final String excelWorkbookExtension = ".xlsx";
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/swati4star/createpdf/util/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import swati4star.createpdf.util.lambda.Consumer;

import static swati4star.createpdf.util.Constants.AUTHORITY_APP;
import static swati4star.createpdf.util.Constants.PATH_SEPERATOR;
import static swati4star.createpdf.util.Constants.PATH_SEPARATOR;
import static swati4star.createpdf.util.Constants.STORAGE_LOCATION;
import static swati4star.createpdf.util.Constants.pdfExtension;

Expand Down Expand Up @@ -228,7 +228,7 @@ public static String getFileName(String path) {
if (path == null)
return null;

int index = path.lastIndexOf(PATH_SEPERATOR);
int index = path.lastIndexOf(PATH_SEPARATOR);
return index < path.length() ? path.substring(index + 1) : null;
}

Expand All @@ -240,10 +240,10 @@ public static String getFileName(String path) {
* @return - extracted filename without extension
*/
public static String getFileNameWithoutExtension(String path) {
if (path == null || path.lastIndexOf(PATH_SEPERATOR) == -1)
if (path == null || path.lastIndexOf(PATH_SEPARATOR) == -1)
return path;

String filename = path.substring(path.lastIndexOf(PATH_SEPERATOR) + 1);
String filename = path.substring(path.lastIndexOf(PATH_SEPARATOR) + 1);
filename = filename.replace(pdfExtension, "");

return filename;
Expand All @@ -256,7 +256,7 @@ public static String getFileNameWithoutExtension(String path) {
* @return absolute path of file directory
*/
public static String getFileDirectoryPath(String path) {
return path.substring(0, path.lastIndexOf(PATH_SEPERATOR) + 1);
return path.substring(0, path.lastIndexOf(PATH_SEPARATOR) + 1);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/swati4star/createpdf/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Objects;

//import static swati4star.createpdf.util.Constants.PATH_SEPERATOR;
import static swati4star.createpdf.util.Constants.PATH_SEPERATOR;
import static swati4star.createpdf.util.Constants.PATH_SEPARATOR;
import static swati4star.createpdf.util.Constants.pdfDirectory;
//import static swati4star.createpdf.util.Constants.pdfDirectory;

Expand Down Expand Up @@ -82,7 +82,7 @@ public String getDefaultStorageLocation() {
Log.e("Error", "Directory could not be created");
}
}
return dir.getAbsolutePath() + PATH_SEPERATOR;
return dir.getAbsolutePath() + PATH_SEPARATOR;
}

/**
Expand Down