Add files via upload

This commit is contained in:
Tomáš Dvořák
2025-05-21 12:44:08 +02:00
committed by GitHub
parent f2309fb2dc
commit caacf11505
4 changed files with 17 additions and 31 deletions
+3 -3
View File
@@ -72,7 +72,7 @@
</div> </div>
<h2 class="text-xl font-bold text-gray-800 mb-2">OSTicket</h2> <h2 class="text-xl font-bold text-gray-800 mb-2">OSTicket</h2>
<p class="text-gray-600 mb-4">Systém technické podpory a hlášení problémů</p> <p class="text-gray-600 mb-4">Systém technické podpory a hlášení problémů</p>
<a href="http://osticket/" class="block text-center bg-orange-600 hover:bg-orange-700 text-white font-medium py-2 px-4 rounded-lg transition-colors"> <a href="#" class="block text-center bg-orange-600 hover:bg-orange-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci Otevřít aplikaci
</a> </a>
</div> </div>
@@ -82,9 +82,9 @@
<div class="rounded-full w-14 h-14 flex items-center justify-center bg-purple-100 text-purple-600 mb-4"> <div class="rounded-full w-14 h-14 flex items-center justify-center bg-purple-100 text-purple-600 mb-4">
<i class="fas fa-tasks text-2xl"></i> <i class="fas fa-tasks text-2xl"></i>
</div> </div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Kanboard</h2> <h2 class="text-xl font-bold text-gray-800 mb-2">Canboard úkolníček</h2>
<p class="text-gray-600 mb-4">Správa úkolů a projektů v přehledném kanban stylu</p> <p class="text-gray-600 mb-4">Správa úkolů a projektů v přehledném kanban stylu</p>
<a href="http://kanboard/" class="block text-center bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-4 rounded-lg transition-colors"> <a href="#" class="block text-center bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci Otevřít aplikaci
</a> </a>
</div> </div>
+3 -17
View File
@@ -172,28 +172,14 @@ func openFolderHandler(w http.ResponseWriter, r *http.Request) {
// Log the request // Log the request
log.Printf("Otevírání složky: %s", folderPath) log.Printf("Otevírání složky: %s", folderPath)
// Properly handle backslashes in Windows paths
// First, replace any forward slashes with backslashes
folderPath = strings.ReplaceAll(folderPath, "/", "\\")
// Fix any double backslashes that might have been created by JavaScript escaping
for strings.Contains(folderPath, "\\\\") {
folderPath = strings.ReplaceAll(folderPath, "\\\\", "\\")
}
// Log the cleaned path
log.Printf("Upravená cesta: %s", folderPath)
// Open the folder in Windows Explorer // Open the folder in Windows Explorer
cmd := exec.Command("explorer.exe", folderPath) cmd := exec.Command("explorer.exe", folderPath)
err := cmd.Start() err := cmd.Start()
if err != nil { if err != nil {
// If there was an error, try opening the parent directory // If there was an error, try to clean the path and retry
log.Printf("Chyba při otevírání složky: %v, zkouším jinou metodu", err) cleanPath := strings.ReplaceAll(folderPath, "/", "\\")
cmd = exec.Command("explorer.exe", cleanPath)
// Try using /root,path format which sometimes works better
cmd = exec.Command("explorer.exe", "/root," + folderPath)
err = cmd.Start() err = cmd.Start()
if err != nil { if err != nil {
BIN
View File
Binary file not shown.