Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3b03a5c

Browse files
Small changes in codeDestroyer
1 parent de57dc8 commit 3b03a5c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎codeDestroyer/codeDestroyer.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
import os
1414
import re
1515

16-
# Unicode symbos for semicolon and the Greek Question mark
16+
# Unicode symbols for semicolon and the Greek Question mark
1717
semicolon = u'\u003b'
1818
greekQmark = u'\u037e'
1919

2020
# Name of file
2121
fileName = input("Enter the file name (like helloWorld.c):\n")
22-
if not os.path.exists(fileName):
23-
print("\nThe filename you entered is not present. Please enter a valid filename.")
22+
filename = os.path.abspath(fileName)
23+
if (not os.path.exists(fileName)) or os.path.islink(fileName):
24+
print("\nThe filename you entered is not valid. Please enter a valid filename.")
2425
sys.exit()
2526
else:
2627
# Open the file to be destroyed

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /