summaryrefslogtreecommitdiff
path: root/core/symlinker/main.cpp
Unidiff
Diffstat (limited to 'core/symlinker/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/symlinker/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/symlinker/main.cpp b/core/symlinker/main.cpp
index 96e7f3c..bf53a82 100644
--- a/core/symlinker/main.cpp
+++ b/core/symlinker/main.cpp
@@ -61,25 +61,25 @@ static void createSymlinks( const QString &location, const QString &package )
61 if ( !ffi.exists() || ffi.isSymLink() ) { 61 if ( !ffi.exists() || ffi.isSymLink() ) {
62 if (symlink( (location+s).ascii(), s.ascii() ) != 0){ 62 if (symlink( (location+s).ascii(), s.ascii() ) != 0){
63 if (errno == ENOENT){ 63 if (errno == ENOENT){
64// perror("Symlink Failed! "); 64// perror("Symlink Failed! ");
65 QString e=s.ascii(); 65 QString e=s.ascii();
66 e = e.replace(ffi.fileName(),""); 66 e = e.replace(ffi.fileName(),"");
67// odebug << "DirName : " << e.ascii() << "" << oendl; 67// odebug << "DirName : " << e.ascii() << "" << oendl;
68 system ( QString("mkdir -p ")+e.ascii() ); 68 system ( QString("mkdir -p ")+e.ascii() );
69 if (symlink( (location+s).ascii(), s.ascii() ) != 0) 69 if (symlink( (location+s).ascii(), s.ascii() ) != 0)
70 odebug << "Big problem creating symlink and directory" << oendl; 70 odebug << "Big problem creating symlink and directory" << oendl;
71 } 71 }
72 } 72 }
73// qDebug ( "Created %s" ,s.ascii() ); 73// odebug << "Created << s.ascii() << oendl;
74 out << s << "\n"; 74 out << s << "\n";
75 } else { 75 } else {
76 odebug << "" << s.ascii() << " exists already, not symlinked" << oendl; 76 odebug << "" << s.ascii() << " exists already, not symlinked" << oendl;
77 } 77 }
78 } 78 }
79 } 79 }
80 inFile.close(); 80 inFile.close();
81 outFile.close(); 81 outFile.close();
82 } 82 }
83} 83}
84 84
85 85
@@ -90,25 +90,25 @@ static void removeSymlinks( const QString &package )
90 90
91 if ( inFile.open(IO_ReadOnly) ) { 91 if ( inFile.open(IO_ReadOnly) ) {
92 QTextStream in(&inFile); 92 QTextStream in(&inFile);
93 93
94 QString s; 94 QString s;
95 while ( !in.eof() ) { // until end of file... 95 while ( !in.eof() ) { // until end of file...
96 s = in.readLine(); // line of text excluding '\n' 96 s = in.readLine(); // line of text excluding '\n'
97// odebug << "remove symlink " << s.ascii() << "" << oendl; 97// odebug << "remove symlink " << s.ascii() << "" << oendl;
98 QFileInfo ffi( s ); 98 QFileInfo ffi( s );
99 //Confirm that it's still a symlink. 99 //Confirm that it's still a symlink.
100 if ( ffi.isSymLink() ){ 100 if ( ffi.isSymLink() ){
101 unlink( s.ascii() ); 101 unlink( s.ascii() );
102// qDebug ( "Removed %s", s.ascii() );} 102// odebug << "Removed " << s.ascii() << oendl; }
103// else 103// else
104// odebug << "Not removed " << s.ascii() << "" << oendl; 104// odebug << "Not removed " << s.ascii() << "" << oendl;
105 } 105 }
106 } 106 }
107 inFile.close(); 107 inFile.close();
108 inFile.remove(); 108 inFile.remove();
109 } 109 }
110} 110}
111 111
112 112
113 113
114/* 114/*