aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS/File Skimmer.vb
diff options
context:
space:
mode:
authorpfg github <[email protected]>2015-03-16 08:43:36 -0700
committerpfg github <[email protected]>2015-03-16 08:43:36 -0700
commit91604723d5c0696e82d729b486abd07aaa9fd24a (patch)
treebc77664095655bce588513cbbe6b1233863de961 /ShiftOS/File Skimmer.vb
parent3fbfbbdb0e9bfe2a9c6c0b79b873189a1bc96314 (diff)
downloadshiftos-91604723d5c0696e82d729b486abd07aaa9fd24a.tar.gz
shiftos-91604723d5c0696e82d729b486abd07aaa9fd24a.tar.bz2
shiftos-91604723d5c0696e82d729b486abd07aaa9fd24a.zip
why use for loops when you can just import system.io also fixed some paths, stopped for the skinning problem
Diffstat (limited to 'ShiftOS/File Skimmer.vb')
-rw-r--r--ShiftOS/File Skimmer.vb32
1 files changed, 22 insertions, 10 deletions
diff --git a/ShiftOS/File Skimmer.vb b/ShiftOS/File Skimmer.vb
index 9d242cc..0cc9085 100644
--- a/ShiftOS/File Skimmer.vb
+++ b/ShiftOS/File Skimmer.vb
@@ -589,16 +589,28 @@ Public Class File_Skimmer
infobox.textinfo = "Unable to move into a higher directory due to error reading the requested folder on the drive." & Environment.NewLine & Environment.NewLine & "You can only enter directories formatted in the ShiftOS file system (ShiftFS)"
infobox.Show()
Else
- Dim endloop As Boolean = False
- lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
-
- While endloop = False
- If lbllocation.Text.Substring(lbllocation.Text.Length - 1) = "/" Then
- endloop = True
- Else
- lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
- End If
- End While
+ Dim directoryInfo As System.IO.DirectoryInfo
+ directoryInfo = System.IO.Directory.GetParent(lbllocation.Text)
+ If (directoryInfo.FullName = "C:\") Then Dim errerror As String = "an error" Else lbllocation.Text = directoryInfo.FullName
+
+ 'Dim endloop As Boolean = False
+ 'lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
+
+ 'While endloop = False
+ ' Try
+ ' If lbllocation.Text.Substring(lbllocation.Text.Length - 1) = "/" Then
+ ' endloop = True
+ ' Else
+ ' lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
+ ' End If
+ ' Catch
+ ' infobox.title = "File Skimmer - Error!"
+ ' infobox.textinfo = "Unable to move into a higher directory due to error reading the requested folder on the drive." & Environment.NewLine & Environment.NewLine & "An error occured going up"
+ ' infobox.Show()
+ ' End Try
+ 'End While
+
+
showcontents()
End If
Else