Skip to content

Commit

Permalink
Fix folder upload with special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
tueddy committed Nov 1, 2023
1 parent 4c49fac commit 49e2fdc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## DEV-branch

* 31.10.2023: Code Formatting via clang-format #264, thank's to @laszloh & @fschrempf !!

* 01.11.2023: Fix folder upload with special chars & playtime formatting


## Version 2 (29.10.2023)
Expand Down
3 changes: 2 additions & 1 deletion html/management.html
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@ <h5 class="modal-title" data-i18n="tools.nvserase.title"></h5>
selectedNode = ref.get_node(sel);
if(selectedNode.data.directory){
path = selectedNode.data.path
console.log("Directory: " + path);
} else {
/* remap sel to parent folder */
sel = ref.get_node(ref.get_parent(sel));
Expand All @@ -1085,7 +1086,7 @@ <h5 class="modal-title" data-i18n="tools.nvserase.title"></h5>
const startTime = new Date().getTime();
let bytesTotal = 0;
$.ajax({
url: '/explorer?path=' + path,
url: '/explorer?path=' + encodeURIComponent(path),
type: 'POST',
data: data,
contentType: false,
Expand Down
6 changes: 4 additions & 2 deletions src/Web.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,10 @@ void explorerCreateParentDirectories(const char *filePath) {
if (rest - filePath != 0) {
memcpy(tmpPath, filePath, rest - filePath);
tmpPath[rest - filePath] = '\0';
Log_Printf(LOGLEVEL_DEBUG, "creating dir \"%s\"\n", tmpPath);
gFSystem.mkdir(tmpPath);
if (!gFSystem.exists(tmpPath)) {
Log_Printf(LOGLEVEL_DEBUG, "creating dir \"%s\"\n", tmpPath);
gFSystem.mkdir(tmpPath);
}
}
rest = strchr(rest + 1, '/');
}
Expand Down
2 changes: 1 addition & 1 deletion src/revision.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#include "gitrevision.h"
constexpr const char softwareRevision[] = "Software-revision: 20231031-1";
constexpr const char softwareRevision[] = "Software-revision: 20231101-1";

0 comments on commit 49e2fdc

Please sign in to comment.