Skip to content

Commit

Permalink
Merge pull request #397 from lmagyar/pr-fix-some-typos
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
wolpi authored Oct 12, 2024
2 parents 03acfd3 + 4f42918 commit 2b12238
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions primitiveFTPd/src/org/primftpd/filesystem/FsFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,9 @@ public OutputStream createOutputStream(long offset) throws IOException {
// some clients do not issue mkdir commands like filezilla
// see isWritable()
File parent = file.getParentFile();
if (parent == null) {
if (parent == null || (!parent.exists() && !parent.mkdirs())) {
throw new IOException(String.format("Failed to create parent folder(s) '%s'", file.getAbsolutePath()));
}
if (!parent.exists()) {
if (!parent.mkdirs()) {
throw new IOException(String.format("Failed to create parent folder(s) '%s'", file.getAbsolutePath()));
}
}

// now create out stream
OutputStream os;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void scanFile(String path) {
// Android 10 (API level 29) and lower: just requests the scan
connection.scanFile(path, null);
} catch (Exception e) {
logger.error(" media scanning start error for file '{}': '{}' ", e, path);
logger.error(" media scanning start error for file '{}': '{}'", path, e.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public VirtualFileSystemView(
public abstract TMina createFile(String absPath, AbstractFile delegate);
public abstract TMina createFile(String absPath, boolean exists);

public abstract AbstractFile getConfigFile();
public abstract VirtualConfigFile getConfigFile();

protected abstract String absolute(String file);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public FtpFile createFile(String absPath, boolean exists) {
}

@Override
public AbstractFile getConfigFile() {
public VirtualFtpConfigFile getConfigFile() {
return new VirtualFtpConfigFile(this, user);
}

Expand Down

0 comments on commit 2b12238

Please sign in to comment.